-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (51 loc) · 1.13 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
version: '3'
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=your_root_username
- MONGO_INITDB_ROOT_PASSWORD=your_root_password
volumes:
- mongodb_data:/data/db
golang-server:
build:
context: ./backend
dockerfile: Dockerfile
container_name: golang-server
ports:
- "8000:8000"
depends_on:
- mongodb
environment:
MONGODB_URI: mongodb://your_root_username:your_root_password@mongodb:27017/golend
node-server:
build:
context: ./golend_frontend/node_redis
dockerfile: Dockerfile
container_name: node-server
ports:
- "3001:3001"
depends_on:
- redis
environment:
REDIS_HOST: redis
redis:
image: redis
container_name: redis
ports:
- "6379:6379"
react-app:
build:
context: ./golend_frontend/frontend
dockerfile: Dockerfile
container_name: react-app
ports:
- "80:80"
depends_on:
- golang-server
- node-server
volumes:
mongodb_data: