generated from yandex-praktikum/go-musthave-diploma-tpl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
54 lines (49 loc) · 1.22 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
version: "3"
services:
market:
image: golang:1.19-alpine
volumes:
- .:/go/src/go-with-compose
working_dir: /go/src/go-with-compose
command: go run cmd/market/main.go
depends_on:
- market_db
environment:
DATABASE_URI: "mongodb://market_db:27017"
KEY: "CHANGE ME"
LOYALTY: "loyalty:8080"
ports:
- "8080:8080"
loyalty:
image: golang:1.19-alpine
volumes:
- .:/go/src/go-with-compose
working_dir: /go/src/go-with-compose
command: go run cmd/gophermart/main.go
depends_on:
- loyalty_db
environment:
DATABASE_URI: "host=loyalty_db port=5432 user=admin password=admin dbname=admin sslmode=disable"
ports:
- "8000:8080"
accrual:
image: ubuntu
volumes:
- .:/go/src/go-with-compose
working_dir: /go/src/go-with-compose
command: ./cmd/accrual/accrual_linux_amd64
ports:
- "8070:8080"
market_db:
image: mongo:4.2.8
volumes:
- .data:/data/db
- .data/conf:/data/configdb
loyalty_db:
image: postgres:13.3
environment:
POSTGRES_DB: ${POSTGRES_DB:-admin}
POSTGRES_USER: ${POSTGRES_DB:-admin}
POSTGRES_PASSWORD: ${POSTGRES_DB:-admin}
ports:
- "5430:5432"