Add docker-compose.yml
This commit is contained in:
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: medieval
|
||||
POSTGRES_USER: medieval
|
||||
POSTGRES_PASSWORD: medievalpass
|
||||
volumes:
|
||||
- dbdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U medieval"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
game:
|
||||
build: ./server
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: postgres://medieval:medievalpass@db:5432/medieval
|
||||
JWT_SECRET: change-me-super-secret
|
||||
PORT: 8080
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./server/static:/app/static
|
||||
- ./server/src:/app/src
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
Reference in New Issue
Block a user