chore: Change port to 80 for production deployment
- Updated Dockerfile to expose port 80 - Health check on port 80 - Environment variable PORT=80 - Standard HTTP port for Easypanel
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -30,15 +30,15 @@ COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/astro.config.mjs ./
|
||||
COPY --from=builder /app/data ./data
|
||||
|
||||
EXPOSE 4321
|
||||
EXPOSE 80
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:4321', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
CMD node -e "require('http').get('http://localhost:80', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV ASTRO_DB_REMOTE_URL=file:/app/data/consent.db
|
||||
ENV PORT=4321
|
||||
ENV PORT=80
|
||||
|
||||
# Start Astro preview server
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4321"]
|
||||
# Start Astro preview server on port 80
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "80"]
|
||||
|
||||
Reference in New Issue
Block a user