26 lines
643 B
Docker
26 lines
643 B
Docker
FROM nginx:alpine
|
|
|
|
# Create directory structure
|
|
RUN mkdir -p /usr/share/nginx/html
|
|
|
|
# Copy all frontend files
|
|
COPY index.html /usr/share/nginx/html/
|
|
#COPY styles.css /usr/share/nginx/html/
|
|
#COPY parcel-ui.js /usr/share/nginx/html/
|
|
|
|
# Copy custom nginx config
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# Ensure correct permissions
|
|
RUN chown -R nginx:nginx /usr/share/nginx/html && \
|
|
chmod -R 755 /usr/share/nginx/html
|
|
|
|
# Expose port
|
|
EXPOSE 80
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|