Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Eggrror404 committed Nov 9, 2023
1 parent 4d18c34 commit bb4b07f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
AUTH_SECRET=

# If server doesn't run on Vercel, `AUTH_TRUST_HOST` needs to be true.
# Enable this when running locally
# Enable this when running locally.
AUTH_TRUST_HOST=1

# Github oauth app secrets.
Expand All @@ -16,10 +16,5 @@ GITHUB_SECRET=

# Signed-in emails that are considered admins, separated by comma.
# Admin users can create, edit, and delete posts.
# And yup, I know doing this is quite dumb.
ADMINS=a@example.com,b@example.com

# Production server settings
# [https://kit.svelte.dev/docs/adapter-node#environment-variables] for more information.
HOST=0.0.0.0
PORT=3000
ORIGIN=http://localhost:3000
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
FROM node:18-alpine
FROM node:lts-alpine
WORKDIR /app

COPY package*.json ./
RUN npm ci

ARG BASE_PATH

COPY . .
ENV NODE_ENV=production
ENV BASE_PATH=${BASE_PATH}
RUN npm run build

EXPOSE 3000
CMD ["node", "build"]
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
services:
app:
image: tnfshcec/web
build: .
build:
context: .
args:
- BASE_PATH=
ports:
- 3000:3000
volumes:
Expand Down

0 comments on commit bb4b07f

Please sign in to comment.