-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
67 lines (66 loc) · 1.6 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
services:
# --- Logical services ---
api-gateway:
image: ashinebourne/api-gateway:latest
ports:
- "8000:8000"
environment:
- JWT_SECRET_KEY=secret
- REDIS_HOST=user-cache
- REDIS_PORT=6379
- REDIS_PASSWORD=password123
volumes:
- ./gateway.conf.yaml:/gateway.conf.yaml
depends_on:
- user-cache
user-management:
image: ashinebourne/user-auth:latest
ports:
- "8001:8000"
environment:
- JWT_SECRET_KEY=secret
- JWT_TOKEN_EXP_MIN=60
- DB_HOST=user-db
- DB_PORT=27017
- DB_USER=root
- DB_PASSWORD=secret
- DB_NAME=user_management
- REDIS_HOST=user-cache
- REDIS_PORT=6379
- REDIS_PASSWORD=password123
depends_on:
- user-db
- user-cache
hello-user:
build:
context: ./backends/hello-user
ports:
- "8002:8000"
depends_on:
- api-gateway
# --- State services (databases, caches, etc.) ---
user-db:
image: mongo
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=secret
- MONGO_INITDB_DATABASE=user_management
user-cache:
image: redis
ports:
- 6379:6379
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
environment:
- REDIS_PASSWORD=password123
# --- Dev tools ---
# db-gui:
# image: mongo-express
# ports:
# - "8081:8081"
# environment:
# ME_CONFIG_MONGODB_ADMINUSERNAME: root
# ME_CONFIG_MONGODB_ADMINPASSWORD: secret
# ME_CONFIG_MONGODB_SERVER: user-db
# restart: always