Initialize deploy/docker-compose

This commit is contained in:
Lucid Kobold
2025-02-19 10:12:52 -05:00
committed by GitHub
commit 621f177653
42 changed files with 8193 additions and 0 deletions

35
Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
FROM node:lts-slim AS base
# Create app directory
WORKDIR /usr/src
FROM base AS builder
# Files required by npm install
COPY package*.json ./
# Install app dependencies
RUN npm ci
# Bundle app source
COPY . .
# Type check app
RUN npm run typecheck
FROM base AS runner
# Files required by npm install
COPY package*.json ./
# Install only production app dependencies
RUN npm ci --omit=dev
# Bundle app source
COPY . .
USER node
# Start the app
EXPOSE 80
CMD ["node", "--import", "tsx", "./src/main.ts"]