This commit is contained in:
2026-01-25 14:43:14 +01:00
parent f965340abe
commit 17684e7e2e
7 changed files with 778 additions and 28 deletions

View File

@@ -16,17 +16,17 @@ COPY . .
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine AS production
# Copy custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Production stage - Using Caddy
FROM caddy:2-alpine AS production
# Copy built assets from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
COPY --from=builder /app/dist /srv
# Copy Caddyfile
COPY Caddyfile /etc/caddy/Caddyfile
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]
# Start Caddy
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]