-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.15 KB
/
docker-compose.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
services:
# PostgreSQL service
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
env_file:
- ./backend/app.env
# PgAdmin service
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 8010
ports:
- "8010:8010"
depends_on:
- postgres
# Next.js service
nextjs:
build:
context: ./frontend/play4good-webapp
ports:
- "3000:3000"
env_file:
- /frontend/play4good-webapp/.env.docker
depends_on:
- go-backend
# Go backend service
go-backend:
build:
context: ./backend
ports:
- "8080:8080"
env_file:
- ./backend/app.env
depends_on:
- postgres
- migrate
migrate:
image: migrate/migrate
volumes:
- ./migrations:/migrations
entrypoint: [
"sh", "-c",
"migrate -path=/migrations -database postgresql://root:secret@localhost:5432/play4good_db?sslmode=disable up"
]
depends_on:
- postgres
volumes:
db: