feat: add dockerfile & docker compose configuration (#1)

This commit is contained in:
azure 2024-11-14 03:44:18 -05:00 committed by GitHub
parent a8b9eaed8b
commit 2a41c25037
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 59 additions and 0 deletions

21
.dockerignore Normal file
View File

@ -0,0 +1,21 @@
node_modules/
.git/
build/
dist/
.svelte-kit/
.output/
.vercel/
.vscode/
LICENSE
README.md
Dockerfile
docker-compose.yml
.npmrc
.prettier*
.gitignore
.env.*
.env
.DS_Store
Thumbs.db

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM oven/bun AS builder
WORKDIR /app
ARG PUB_HOSTNAME
ARG PUB_PLAUSIBLE_URL
ENV PUB_HOSTNAME=${PUB_HOSTNAME}
ENV PUB_PLAUSIBLE_URL=${PUB_PLAUSIBLE_URL}
COPY package.json ./
RUN bun install
COPY . ./
RUN bun run build
FROM oven/bun:alpine
WORKDIR /app
COPY --from=builder /app/build ./
EXPOSE 3000
CMD [ "bun", "run", "start" ]

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
services:
vert:
container_name: vert
build:
context: .
args:
PUB_HOSTNAME: "vert.sh"
PUB_PLAUSIBLE_URL: "https://plausible.example.com"
restart: unless-stopped
ports:
- 3000:3000