21 lines
968 B
Docker
21 lines
968 B
Docker
# ── Build stage ───────────────────────────────────────────────────────
|
|
FROM docker.io/library/node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npx ng build --configuration production
|
|
|
|
# ── Serve stage ────────────────────────────────────────────────────────
|
|
FROM docker.io/library/nginx:alpine
|
|
COPY --from=build /app/dist/radio-station/browser /usr/share/nginx/html
|
|
COPY nginx.conf.template /etc/nginx/conf.d/nginx.conf.template
|
|
COPY config.json.template /usr/share/nginx/html/config.json.template
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
ENV API_UPSTREAM=http://api:8000
|
|
ENV API_PUBLIC_URL=""
|
|
RUN mkdir -p /logs
|
|
EXPOSE 80
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|