-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
117 lines (105 loc) · 2.17 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
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
115
116
117
version: '3.9'
services:
auth-api:
build:
context: ./auth
dockerfile: Dockerfile
restart: always
env_file:
- .env
expose:
- ${APP_PORT}
networks:
custom_network:
depends_on:
- db-auth
- redis-auth
- nginx-auth
- jaeger-auth
auth-grpc:
build:
context: ./auth
dockerfile: Dockerfile
restart: always
environment:
- RUN_MODE=GRPC
env_file:
- .env
expose:
- ${GRPC_PORT}
networks:
custom_network:
depends_on:
- db-auth
- redis-auth
- nginx-auth
- jaeger-auth
db-auth:
image: postgres:15.2-alpine
restart: always
volumes:
- postgres:/var/lib/postgresql/data
env_file:
- .env
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
networks:
custom_network:
redis-auth:
container_name: ${PROJECT_NAME}-redis
image: redis:7.0.10-alpine
restart: always
volumes:
- redis:/data
networks:
custom_network:
expose:
- ${REDIS_PORT}
nginx-auth:
image: nginx:1.23.3
restart: always
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
networks:
custom_network:
ports:
- ${NGINX_PORT}:${NGINX_PORT}
jaeger-auth:
image: jaegertracing/all-in-one:1.6.0
restart: always
networks:
custom_network:
ports:
- ${JAEGER_PORT_1}:${JAEGER_PORT_1}/udp
- ${JAEGER_PORT_2}:${JAEGER_PORT_2}
test-db-auth:
image: postgres:15.2-alpine
restart: always
volumes:
- test-postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=web
- POSTGRES_HOST=test-db-auth
- POSTGRES_PORT=5432
- POSTGRES_USER=test
- POSTGRES_PASSWORD=123qwe
- POSTGRES_DSN=postgresql://test:123qwe@test-db-auth:5432/web
ports:
- '5432:5432'
test-redis-auth:
container_name: ${PROJECT_NAME}-test-redis
image: redis:7.0.10-alpine
restart: always
volumes:
- test-redis:/data
ports:
- '6379:6379'
volumes:
postgres:
redis:
test-postgres:
test-redis:
networks:
custom_network:
external: True