summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-03-24 16:14:48 +0000
committerJoe Carstairs <me@joeac.net>2026-03-24 16:14:48 +0000
commitba0f349be9c90402b1e027aca1c4efcb330913d1 (patch)
treed7df4c5b8024a464882af84c8ad3a592b3514b97 /website
parentac31fbf862a633dfb14825c244df30bfe4dc75e8 (diff)
improves website/Dockerfile
Diffstat (limited to 'website')
-rw-r--r--website/.dockerignore1
-rw-r--r--website/Dockerfile29
2 files changed, 18 insertions, 12 deletions
diff --git a/website/.dockerignore b/website/.dockerignore
index 6966f08..8e68da2 100644
--- a/website/.dockerignore
+++ b/website/.dockerignore
@@ -2,6 +2,5 @@
dist/
node_modules/
.dockerignore
-.env
*.sqlite
Dockerfile
diff --git a/website/Dockerfile b/website/Dockerfile
index 07a6ca6..b353922 100644
--- a/website/Dockerfile
+++ b/website/Dockerfile
@@ -1,8 +1,9 @@
-FROM node:lts-alpine3.22 AS build
+FROM node:lts-alpine3.22
WORKDIR /app
+RUN apk add --no-cache git
COPY package.json package-lock.json ./
-RUN apk add --no-cache git && npm install && apk del git
+RUN npm install && apk del git
COPY astro.config.mjs ./
COPY db ./db/
@@ -12,18 +13,24 @@ RUN mkdir -p "$(dirname "$(echo "$ASTRO_DB_REMOTE_URL" | cut -d':' -f 2)")"
RUN npm run astro db push
COPY . .
-RUN npm run build && rm -rf public src
-
-FROM node:lts-alpine3.22 AS final
-WORKDIR /app
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
-ENV MAX_DAILY_EMAILS=100
-COPY --from=build /app/node_modules node_modules
-COPY --from=build /app/db.sqlite db.sqlite
-COPY --from=build /app/dist/ .
+ARG LOCAL_SMTP_HOST
+ARG LOCAL_SMTP_PASSWORD
+ARG LOCAL_SMTP_PORT
+#ENV LOCAL_SMTP_ENVELOPE_FROM=$LOCAL_SMTP_ENVELOPE_FROM \
+#ENV LOCAL_SMTP_USER=$LOCAL_SMTP_USER \
+ #LOCAL_SMTP_HOST=$LOCAL_SMTP_HOST \
+ #LOCAL_SMTP_PASSWORD=$LOCAL_SMTP_PASSWORD \
+# LOCAL_SMTP_PORT=$LOCAL_SMTP_PORT \
+# REMOTE_SMTP_HOST=$REMOTE_SMTP_HOST \
+# REMOTE_SMTP_PORT=$REMOTE_SMTP_PORT \
+# REMOTE_SMTP_USER=$REMOTE_SMTP_USER \
+# MAX_DAILY_EMAILS=$MAX_DAILY_EMAILS
+
+RUN npm run build && rm -rf public src
-CMD ["node", "./server/entry.mjs"]
+CMD ["node", "./dist/server/entry.mjs"]