mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-19 22:08:58 +00:00
new examples
This commit is contained in:
36
node/angular/static/.coolpack/Dockerfile
Normal file
36
node/angular/static/.coolpack/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Generated by Coolpack
|
||||
# Provider: node, Framework: angular, Output: static
|
||||
|
||||
FROM node:24-slim AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Custom packages: curl, wget, ffmpeg
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
wget \
|
||||
ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/app/node_modules/.cache npm run build
|
||||
|
||||
FROM caddy:alpine AS runner
|
||||
|
||||
RUN addgroup --system --gid 1001 coolgroup && \
|
||||
adduser --system --uid 1001 -G coolgroup cooluser
|
||||
|
||||
COPY --from=builder /app/dist /srv
|
||||
|
||||
RUN chown -R cooluser:coolgroup /srv
|
||||
|
||||
USER cooluser
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["caddy", "file-server", "--root", "/srv", "--listen", ":80"]
|
||||
Reference in New Issue
Block a user