feat: dockerized

This commit is contained in:
hugeblank 2024-12-03 10:43:26 -08:00
parent 8d9413b013
commit 3e776018d6
2 changed files with 30 additions and 0 deletions

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM node:22-alpine AS base
FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
FROM base AS runner
WORKDIR /app
COPY --from=builder /app/build ./
ENV PORT=3000
EXPOSE 3000
CMD ["node", "index.js"]

11
compose.yaml Normal file
View file

@ -0,0 +1,11 @@
services:
whitebreeze:
container_name: whitebreeze
pull_policy: build
build:
context: ./
dockerfile: Dockerfile
restart: unless-stopped
env_file: ./.env
ports:
- 5000:3000