forked from kamp-us/course-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
67 lines (63 loc) · 1.32 KB
/
docker-compose.yaml
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
61
62
63
64
65
66
67
version: "3.9"
services:
api-with-air:
image: cosmtrek/air
working_dir: /app
environment:
- POSTGRES_USER=pgtest
- POSTGRES_DB=pgtest
- POSTGRES_PASSWORD=pgtest
- POSTGRES_HOST=postgres
ports:
- "8080:80"
volumes:
- ./.:/app
links:
- postgres
depends_on:
- postgres
postgres:
image: postgres:13.3-alpine
environment:
- POSTGRES_USER=pgtest
- POSTGRES_DB=pgtest
- POSTGRES_PASSWORD=pgtest
ports:
- "15432:5432"
healthcheck:
test: pg_isready -U pgtest -d pgtest
interval: 10s
timeout: 3s
retries: 5
pgadmin:
image: dpage/pgadmin4
restart: always
environment:
- PGADMIN_DEFAULT_PASSWORD=secret
- PGADMIN_LISTEN_PORT=80
- PGADMIN_LOG_LEVEL=50
ports:
- "8090:80"
links:
- postgres
logging:
driver: "none"
volumes:
- ./scripts/servers.json:/pgadmin4/servers.json
db-migrator:
image: migrate/migrate
command:
- -path
- /migrations/
- -database
- postgres://pgtest:pgtest@postgres:5432/pgtest?sslmode=disable
- up
links:
- postgres
depends_on:
- postgres
volumes:
- ./db/migrations:/migrations
profiles:
- tools