20 lines
460 B
Docker
20 lines
460 B
Docker
FROM nginx:alpine
|
|
|
|
# Remove default nginx config
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
|
|
# Copy custom nginx configuration
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Copy static frontend files
|
|
COPY public/ /usr/share/nginx/html/
|
|
|
|
# Expose HTTP port
|
|
EXPOSE 80
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|