From 93f80150a1d07cf3ce51447636c7f8cd510832f1 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 13 Dec 2025 17:03:24 -0800 Subject: Syntax highlighting and a real repo struct --- Dockerfile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 89746d6..89218ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,24 @@ -FROM nginx:alpine as adelie +FROM node:22-alpine AS builder -COPY static/ /usr/share/nginx/html/ +ARG HOST="adelie.liz.coffee" +ENV HOST=${HOST} -COPY nginx.conf /etc/nginx/nginx.conf +WORKDIR /app +COPY package*.json ./ +RUN npm ci --only=production + +COPY src/ ./src/ +COPY esbuild.config.js ./ +RUN npm run build -COPY docker-entrypoint.sh /usr/local/bin/ -RUN chmod +x /usr/local/bin/docker-entrypoint.sh +FROM nginx:alpine as adelie + +COPY --from=builder /app/dist/ /usr/share/nginx/html/ +COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1 -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] +CMD ["nginx", "-g", "daemon off;"] -- cgit v1.2.3-70-g09d2