-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (49 loc) · 997 Bytes
/
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
version: "3"
services:
db:
image: postgres
container_name: db
expose:
- 5432
ports:
- 5432:5432
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- main
environment:
- POSTGRES_DB=main
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
app:
build: .
container_name: app
expose:
- 8080
ports:
- 8080:8080
environment:
- APP_PORT=8080
- MIGRATIONS_DIR=file:///opt/app/migrations
- DB_URL=postgres://postgres:postgres@db:5432/main?sslmode=disable
command: ["/opt/app/scripts/wait-for-it.sh", "/opt/app/github-app"]
depends_on:
- db
networks:
- main
test-db:
image: postgres
container_name: test-db
expose:
- 5433
ports:
- 5433:5432
networks:
- main
environment:
- POSTGRES_DB=main_test
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
networks:
main:
driver: bridge