forked from kevinshen56714/SkyOffice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
57 lines (57 loc) · 1.14 KB
/
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
version: "3.9"
services:
webapp1:
build:
dockerfile: ./Dockerfile
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PORT=8081
- MONGO_URL=mongodb://root:example@mongo:27017/
- SELF_HOSTNAME=webapp1
expose:
- "8081"
depends_on:
- "redis"
- "mongo"
webapp2:
build:
dockerfile: ./Dockerfile
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- PORT=8082
- MONGO_URL=mongodb://root:example@mongo:27017/
- SELF_HOSTNAME=webapp2
expose:
- "8082"
depends_on:
- "redis"
- "mongo"
proxy:
build:
dockerfile: ./Dockerfile.router
environment:
- REDIS_URL=redis://redis:6379/0
- PORT=8080
ports:
- "8080:8080"
depends_on:
- "webapp1"
- "webapp2"
- "redis"
redis:
image: "redis:7.0.8"
expose:
- "6379"
volumes:
- "./data/redis:/data"
mongo:
image: "mongo:latest"
expose:
- "27017"
user: "mongodb:mongodb"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: app