Add Docker files

This commit is contained in:
2025-08-31 14:03:00 +02:00
parent 5ce8d82202
commit 0a0168671c
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]

View File

@@ -0,0 +1,29 @@
version: '3.8'
services:
app:
build: .
ports:
- "3000:3000"
env_file:
- .env
depends_on:
- db
volumes:
- .:/app
- /app/node_modules
db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: