forked from unusualcodeorg/gomicro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (68 loc) · 1.57 KB
/
docker-compose.yml
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
services:
kong:
build:
context: ./kong
container_name: kong
user: root
restart: unless-stopped
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "8444:8444"
depends_on:
- auth
- blog
auth:
build:
context: ./auth_service
container_name: auth
restart: unless-stopped
depends_on:
- mongo
- redis
blog:
build:
context: ./blog_service
container_name: blog
restart: unless-stopped
depends_on:
- mongo
- redis
mongo:
image: mongo:7.0.12
container_name: mongo
restart: unless-stopped
env_file: .env
environment:
- MONGO_INITDB_ROOT_USERNAME=${DB_ADMIN}
- MONGO_INITDB_ROOT_PASSWORD=${DB_ADMIN_PWD}
ports:
- '${DB_PORT}:27017'
command: mongod --bind_ip_all
volumes:
- ./.extra/setup/blog-init-mongo.js:/docker-entrypoint-initdb.d/blog-init-mongo.js:ro
- ./.extra/setup/auth-init-mongo.js:/docker-entrypoint-initdb.d/auth-init-mongo.js:ro
- dbdata:/data/db
redis:
image: redis:7.2.5
container_name: redis
restart: unless-stopped
env_file: .env
ports:
- '${REDIS_PORT}:6379'
command: redis-server --bind localhost --bind 0.0.0.0 --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- cache:/data/cache
nats:
image: nats:2.10.17
container_name: nats
restart: unless-stopped
env_file: .env
ports:
- "${NATS_CLIENT_PORT}:4222"
- "${NATS_MANAGEMENT_PORT}:8222"
volumes:
dbdata:
cache:
driver: local