feat: docker compose

This commit is contained in:
JamesFlare1212
2025-05-13 01:10:47 -04:00
parent 2cba86eb45
commit 8e74fd6a5b
3 changed files with 30 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:lts-bullseye AS builder
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
FROM nginx:1.27-alpine AS runner
COPY --from=builder /app/dist/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

11
docker-compose.yaml Normal file
View File

@@ -0,0 +1,11 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: dsas-cca-frontend
ports:
- "${PORT}:80"
env_file:
- .env
restart: unless-stopped

1
example.env Normal file
View File

@@ -0,0 +1 @@
PORT=3040