generated from yandex-praktikum/go-musthave-group-diploma-tpl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
104 lines (90 loc) · 2.77 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '3.7'
services:
gophermarket_gophermart:
build:
context: .
dockerfile: ./Dockerfiles/gophermart/Dockerfile
image: docker-gophermart
container_name: gophermarket_gophermart
restart: always
environment:
- RUN_ADDRESS=gophermarket_gophermart:8080
- ACCRUAL_SYSTEM_ADDRESS=http://gophermarket_accrual:8080
- DATABASE_URI=postgres://gophermart:gophermartpwd@gophermarket_postgres_db:5432/gophermart?sslmode=disable
- LOGGER_LEVEL=Debug
- MIGRATIONS_PATH_AUTH=./db/gophermart/migrations
depends_on:
- gophermarket_postgres_db
- gophermarket_krakend_ce
- gophermarket_accrual
gophermarket_accrual:
build:
context: .
dockerfile: ./Dockerfiles/accrual/Dockerfile
image: docker-accrual
container_name: gophermarket_accrual
restart: always
environment:
- RUN_ADDRESS=gophermarket_accrual:8080
- DATABASE_URI=postgres://accrual:accrualpwd@gophermarket_postgres_db:5432/accrual?sslmode=disable
- LOGGER_LEVEL=Debug
- MIGRATIONS_PATH_AUTH=./db/accrual/migrations
depends_on:
- gophermarket_postgres_db
- gophermarket_krakend_ce
gophermarket_auth:
build:
context: .
dockerfile: ./Dockerfiles/auth/Dockerfile
image: docker-auth
container_name: gophermarket_auth
restart: always
environment:
- RUN_ADDRESS=gophermarket_auth:8080
- DATABASE_URI=postgres://auth:authpwd@gophermarket_postgres_db:5432/auth?sslmode=disable
- LOGGER_LEVEL=Debug
- MIGRATIONS_PATH_AUTH=./db/auth/migrations
depends_on:
- gophermarket_postgres_db
- gophermarket_krakend_ce
- gophermarket_accrual
- gophermarket_gophermart
gophermarket_postgres_db:
image: postgres:15.3
container_name: gophermarket_postgres_db
restart: always
environment:
- POSTGRES_PASSWORD=RASKkCt3PVEU
- POSTGRES_USER=seed
- POSTGRES_DB=seed
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- 5432:5432
volumes:
- pg_data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
gophermarket_pgadmin:
image: dpage/pgadmin4:7.5
container_name: gophermarket_pgadmin
restart: always
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: go
volumes:
- ./pgadmindata/servers.json:/pgadmin4/servers.json
depends_on:
- gophermarket_postgres_db
gophermarket_krakend_ce:
image: devopsfaith/krakend:latest
container_name: gophermarket_krakend_ce
restart: always
volumes:
- ./krakend/config:/etc/krakend
ports:
- "8080:8080"
command: [ "run", "-d", "-c", "/etc/krakend/krakend.json" ]
volumes:
pg_data: { }
pgadmin-data: { }