-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (63 loc) · 1.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: '3'
services:
iris_api:
image: iris_api
container_name: iris_api
restart: unless-stopped
build:
context: .
dockerfile: ops/dev/Dockerfile
command: uvicorn iris_api.app.main:app --host 0.0.0.0 --port 8000
environment:
- APP_ENV="prod"
- APP_DEBUG="False"
- APP_PORT=8000
- MONGODB_DATABASE=iris
- MONGODB_USERNAME=iris_user
- MONGODB_HOSTNAME=mongodb
- MONGODB_PASSWORD=iris_password
depends_on:
- iris_provisioning
networks:
- backend
ports:
- "8000:8000"
volumes:
- appdata:/iris_api
iris_provisioning:
image: iris_provisioning
container_name: iris_provisioning
command: ["/bin/sh", "wait_for_mongo.sh", "python", "./provision_db.py"]
build:
context: .
dockerfile: ops/dev/provisioning/Dockerfile
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=mongo
- MONGODB_DATABASE=iris
- MONGODB_USERNAME=iris_user
- MONGODB_HOSTNAME=mongodb
- MONGODB_PASSWORD=iris_password
depends_on:
- mongodb
networks:
- backend
mongodb:
image: 'mongo'
container_name: 'my_mongo'
environment:
- MONGO_INITDB_DATABASE=iris
- MONGO_INITDB_ROOT_USERNAME=mongo
- MONGO_INITDB_ROOT_PASSWORD=mongo
volumes:
- ./mongo-volume:/data/db
ports:
- '27017-27019:27017-27019'
networks:
- backend
networks:
backend:
driver: bridge
volumes:
appdata:
driver: local