-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
62 lines (57 loc) · 1.86 KB
/
docker-compose.dev.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
# Application compose file for Mangrove Monitoring
# This is the dev compose file for dev and testing purposes, all containers run on a single Docker host on the default bridge network.
# IP addresses and port numbers are hardcoded here for local dev purposes
services:
# define env in seperate .env file in container
frontend:
build: ./frontend
container_name: frontend
ports:
- 8081:80
depends_on:
- webserver
environment:
- PORT=80
- WEBSERVER_ADDRESS=webserver:80
- REACT_APP_NGINX_ADDRESS=localhost:8081
# Make sure you have a .env file with env variables set for AWS secret credentials
webserver:
build: ./webserver
container_name: webserver
depends_on:
- db
- ip-service
environment:
- PORT=80
- MONGO_CONNECTION_STRING=mongodb://mongo_db:27017/mmict-test
- FRONTEND_ADDRESS=frontend:80
- IP_ADDRESS=image_processing_service:5002 # ultilize Docker DNS resolution to resolve address of IP_service
- AWS_REGION=${AWS_REGION}
- AWS_BUCKET_NAME=${AWS_BUCKET_NAME}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
db:
image: mongo
container_name: mongo_db
volumes:
- mongo-db:/data/db # named volume - name:path
ip-service:
build: ./ip-service
container_name: image_processing_service
environment:
- PORT=5002
- HOST_IP=0.0.0.0
- WEBSERVER_ADDRESS=webserver:80
- AWS_BUCKET_NAME=${AWS_BUCKET_NAME}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# need to do this for named volumes since can be used across multiple services
volumes:
mongo-db: