forked from xgeekshq/split
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
84 lines (79 loc) · 1.71 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
version: "3.9"
services:
backend:
container_name: backend
restart: unless-stopped
build:
context: backend
dockerfile: Dockerfile
target: development
command: npm run start:dev
ports:
- 3200:3200
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- /app/node_modules
networks:
- split-network
depends_on:
- mongo
frontend:
container_name: frontend
restart: unless-stopped
build:
context: frontend
dockerfile: Dockerfile
target: development
command: npm run dev
ports:
- 3000:3000
env_file:
- ./frontend/.env
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- split-network
depends_on:
- backend
mongo2:
container_name: mongo2
image: mongo
restart: always
command: "bash -c '/usr/bin/mongod --replSet $${MONGO_REPLICA_NAME} --journal --bind_ip_all'"
ports:
- "27018:27017"
env_file:
- ./database/.env
networks:
- split-network
mongo:
container_name: mongo
image: mongo
restart: always
command: "bash -c '/usr/bin/mongod --replSet $${MONGO_REPLICA_NAME} --journal --bind_ip_all'"
ports:
- "27017:27017"
env_file:
- ./database/.env
links:
- mongo2
volumes:
- ./database/rs-init.sh:/scripts/rs-init.sh
networks:
- split-network
redis:
container_name: redis
image: redis
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'
env_file:
- ./database/redis/.env
networks:
split-network:
driver: bridge