-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (104 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
114 lines (104 loc) · 2.46 KB
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
105
106
107
108
109
110
111
112
113
114
version: '3.9'
services:
postgres1:
image: postgres
container_name: "my-postgres1"
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mypassword
- POSTGRES_DB=ticketservice
volumes:
- postgres_data1:/var/lib/postgresql/data
- ./postgresdata/ticket/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgresdata/ticket/csvs:/fakedata
ports:
- target: 5432
published: 5433
protocol: tcp
mode: host
postgres:
build:
context: ./postgres
container_name: "my-postgres2"
restart: unless-stopped
environment:
- POSTGRES_USER=airport
- POSTGRES_PASSWORD=airport
- POSTGRES_DB=airport
volumes:
- postgres_data2:/var/lib/postgresql/data
ports:
- target: 5432
published: 5434
protocol: tcp
mode: host
redis:
image: redis
container_name: "my-redis"
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- redis_data:/data
ports:
- target: 6379
published: 6380
protocol: tcp
mode: host
environment:
- REDIS_REPLICATION_MODE=master
authcore:
restart: unless-stopped
environment:
- REDIS_URL=redis:6379
- REDIS_DB=1
- DATABASE_URL=postgres://postgres1:mypassword@mydb:5432/postgres
- HTTP_LISTEN=0.0.0.0:51691
- GRPC_LISTEN_ADDRESS=0.0.0.0:21901
build:
context: ./AuthCore
ports:
- '5000:5000'
depends_on:
- redis
- postgres
ticket:
restart: unless-stopped
environment:
- HOST=0.0.0.0
- PORT=3000 # this can be defined in the dockerfile instead of here.
- PG_USER=postgres
- PG_PASSWORD=mypassword
- PG_DATABASE=ticketservice
- PG_PORT=5432
- PG_HOST=postgres1
- BANK_URL=bank:8000
- RECEIPT_ID=123456
build:
context: ./TicketService
depends_on:
- postgres1
- authcore
front:
restart: unless-stopped
environment:
- REACT_APP_AUTH_HOST=authcore
- REACT_APP_AUTH_PORT=5000
- REACT_APP_TICKET_HOST=ticket
- REACT_APP_TICKET_PORT=3000
container_name: "my-renginx"
build:
context: ./Front
ports:
- "8000:80"
depends_on:
- authcore
bank:
restart: unless-stopped
container_name: bank
build:
context: ./bank
volumes:
postgres_data1:
postgres_data2:
redis_data: