feat: add dockerfile & docker compose configuration

This commit is contained in:
azure 2024-11-13 22:36:00 -05:00
parent a8b9eaed8b
commit c137065d60
No known key found for this signature in database
GPG Key ID: 78C7CB2FBB62D96D
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