| |
| |
| |
| |
|
|
| |
| FROM node:18-alpine AS builder |
|
|
| WORKDIR /app |
|
|
| |
| COPY index.html . |
| COPY style.css . |
| COPY script.js . |
| COPY README.md . |
|
|
| |
| |
|
|
| |
| |
| |
| |
|
|
| |
| FROM nginx:1.25-alpine |
|
|
| |
| RUN apk update && \ |
| apk upgrade && \ |
| apk add --no-cache \ |
| ca-certificates \ |
| tzdata && \ |
| rm -rf /var/cache/apk/* |
|
|
| |
| ENV TZ=UTC |
|
|
| |
| RUN rm -rf /etc/nginx/conf.d/default.conf && \ |
| rm -rf /usr/share/nginx/html/* |
|
|
| |
| COPY nginx.conf /etc/nginx/nginx.conf |
| COPY nginx-site.conf /etc/nginx/conf.d/default.conf |
|
|
| |
| COPY --from=builder /app/index.html /usr/share/nginx/html/ |
| COPY --from=builder /app/style.css /usr/share/nginx/html/ |
| COPY --from=builder /app/script.js /usr/share/nginx/html/ |
| COPY --from=builder /app/README.md /usr/share/nginx/html/ |
|
|
| |
| RUN addgroup -g 1001 -S nginx-app && \ |
| adduser -S -D -H -u 1001 -h /usr/share/nginx/html -s /sbin/nologin -G nginx-app -g nginx-app nginx-app |
|
|
| |
| RUN chown -R nginx-app:nginx-app /usr/share/nginx/html && \ |
| chown -R nginx-app:nginx-app /var/cache/nginx && \ |
| chown -R nginx-app:nginx-app /var/log/nginx && \ |
| chown -R nginx-app:nginx-app /etc/nginx/conf.d && \ |
| touch /var/run/nginx.pid && \ |
| chown -R nginx-app:nginx-app /var/run/nginx.pid |
|
|
| |
| USER nginx-app |
|
|
| |
| EXPOSE 8080 |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ |
| CMD wget --quiet --tries=1 --spider http://localhost:8080/ || exit 1 |
|
|
| |
| LABEL maintainer="Valentine Experience Team" \ |
| version="3.0.0" \ |
| description="Premium Valentine's Day Interactive Experience" \ |
| org.opencontainers.image.title="Valentine Experience" \ |
| org.opencontainers.image.description="Corporate-grade Valentine's Day web application" \ |
| org.opencontainers.image.version="3.0.0" \ |
| org.opencontainers.image.vendor="Valentine Experience Team" |
|
|
| |
| CMD ["nginx", "-g", "daemon off;"] |
|
|