27 lines
771 B
Docker
27 lines
771 B
Docker
# LemonLink Landing Page - Production Dockerfile
|
|
FROM nginx:alpine
|
|
|
|
# Copy custom nginx configuration
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Copy website files to nginx html directory
|
|
COPY index.html /usr/share/nginx/html/
|
|
COPY styles.css /usr/share/nginx/html/
|
|
COPY script.js /usr/share/nginx/html/
|
|
|
|
# Create non-root user for security
|
|
RUN chown -R nginx:nginx /usr/share/nginx/html && \
|
|
chown -R nginx:nginx /var/cache/nginx && \
|
|
chown -R nginx:nginx /var/log/nginx && \
|
|
chown -R nginx:nginx /etc/nginx/conf.d
|
|
|
|
# Add health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1
|
|
|
|
# Expose port 80
|
|
EXPOSE 80
|
|
|
|
# Run nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|