-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
86 lines (80 loc) · 1.9 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.8'
services:
db:
container_name: "gomoney-db"
image: postgres:latest
restart: always
env_file:
- ./db.env
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
- ./scripts/multiple-database.sh:/docker-entrypoint-initdb.d/multiple-database.sh
healthcheck:
test: ["CMD", "pg_isready", "-U", "user", "-d", "gomoney"]
interval: 10s
timeout: 30s
retries: 5
cache:
container_name: "gomoney-cache"
image: redis:latest
restart: always
ports:
- "6379:6379"
volumes:
- cache:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 30s
retries: 5
server-dev:
container_name: "gomoney-grpc-server"
volumes:
- .:/go/src/github.com/lordvidex/gomoney
environment:
- DATABASE_URL=${DATABASE_URL}
build:
dockerfile: deployments/Dockerfile-server
target: development
depends_on:
db:
condition: service_healthy
ports:
- "8002:8080"
- "8003:8081"
api:
container_name: "gomoney-api-server"
volumes:
- .:/go/src/github.com/lordvidex/gomoney-api/
environment:
- GRPC_SERVER=server-dev:8080
- REDIS_URL=${REDIS_URL}
- APP_ENV=production
- SYMMETRIC_KEY=${SYMMETRIC_KEY}
build:
dockerfile: deployments/Dockerfile-api
target: development
depends_on:
cache:
condition: service_healthy
ports:
- "8000:8080"
telegram:
container_name: "gomoney-telegram-server"
environment:
- GRPC_SERVER=server-dev:8080
- REDIS_URL=${REDIS_URL}
- BOT_TOKEN=${BOT_TOKEN}
volumes:
- .:/go/src/github.com/lordvidex/gomoney/
build:
dockerfile: deployments/Dockerfile-telegram
target: development
depends_on:
cache:
condition: service_healthy
volumes:
db:
cache: