-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-go.yml
121 lines (114 loc) · 2.86 KB
/
docker-compose-go.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
x-environment: &environment
COMPOSE_DOCKER_CLI_BUILD: 1 # Enables DOCKER_BUILDKIT (Used to cache go mod/py pip dependencies)
services:
mongodb:
image: mongo:latest
container_name: mongodb
environment:
<<: *environment
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
ports:
- 27017:27017
volumes:
- mongodb_data_container:/data/db
networks:
- backend
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.8-management-alpine
environment:
<<: *environment
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
ports:
# AMQP protocol port
- "5672:5672"
# HTTP management UI
- "15672:15672"
networks:
- backend
web-server:
build:
context: ./go-web-server
dockerfile: ./Dockerfile
image: web-server-img
container_name: web-server
depends_on:
- rabbitmq
- mongodb
environment:
<<: *environment
APP_PORT: 5000
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_IP: mongodb
JWT_SECRET: ${JWT_SECRET_KEY}
volumes:
- ./GoWebServer/data:/app/data
- ./GoWebServer/web-server.log:/app/web-server.log
ports:
- 5000:5000
networks:
- backend
sfm-worker:
build:
context: ./sfm-worker
dockerfile: Dockerfile
image: sfm-worker-img
container_name: sfm-worker
depends_on:
- rabbitmq
- web-server
environment:
<<: *environment
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
SFM_USE_GPU: ${SFM_USE_GPU}
volumes:
- ./sfm-worker:/app
ports:
- 5100:5100
networks:
- backend
command: python3.10 main.py --config=configs/default.txt
deploy: # Use NVIDIA GPUs
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
nerf-worker:
build:
context: ./nerf-worker
dockerfile: Dockerfile
image: nerf-worker-img
container_name: nerf-worker
depends_on:
- rabbitmq
- web-server
volumes:
- ./nerf-worker:/app
environment:
<<: *environment
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
ports:
- 5200:5200
networks:
- backend
command: python3.8 main.py
deploy: # Use NVIDIA GPUs
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
backend:
name: backend-network
driver: bridge
volumes:
mongodb_data_container: