-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 900 Bytes
/
docker-compose.yml
File metadata and controls
45 lines (42 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
services:
postgres:
image: postgres:latest
ports:
- '5432:5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=grid_game
volumes:
- pgdata:/var/lib/postgresql/data
next:
image: node:20-bullseye
ports:
- '3000:3000'
volumes:
- .:/app
- /app/node_modules
working_dir: /app
command: bash -c "npm install && npm run db:generate && npm run db:migrate && npm run dev"
# command: bash -c "npm install && npm run dev"
environment:
- DATABASE_URL=postgres://postgres:password@postgres:5432/grid_game
- SEED_DIR=src/db/seeds
restart: on-failure
depends_on:
- postgres
profiles:
- next
swagger-ui:
image: swaggerapi/swagger-ui:v5.17.13
ports:
- "3001:8080"
environment:
- SWAGGER_JSON=/openapi.yaml
volumes:
- ./openapi.yaml:/openapi.yaml
profiles:
- next
- dev
volumes:
pgdata: