# ── 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 docker-entrypoint.sh /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh ENV API_UPSTREAM=http://api:8000 EXPOSE 80 ENTRYPOINT ["/docker-entrypoint.sh"]