-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
79 lines (74 loc) · 2.01 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
69
70
71
72
73
74
75
76
77
78
79
services:
flask:
container_name: flask
image: vadims06/topolograph:latest
restart: unless-stopped
environment:
APP_ENV: "prod"
APP_DEBUG: "False"
APP_PORT: 5000
MONGODB_DATABASE: $MONGODB_DATABASE
MONGODB_USERNAME: $MONGODB_USERNAME
MONGODB_PASSWORD: $MONGODB_PASSWORD
MONGODB_HOSTNAME: $MONGODB_HOSTNAME
NAPALM_USERNAME: $NAPALM_USERNAME
NAPALM_PASSWORD: $NAPALM_PASSWORD
NAPALM_PORT: $NAPALM_PORT
DNS: $DNS
NETBOX_URL: $NETBOX_URL # http://localhost:8000
NETBOX_RO_TOKEN : $NETBOX_RO_TOKEN
TOPOLOGRAPH_WEB_API_USERNAME_EMAIL: $TOPOLOGRAPH_WEB_API_USERNAME_EMAIL
TOPOLOGRAPH_WEB_API_PASSWORD: $TOPOLOGRAPH_WEB_API_PASSWORD
TOPOLOGRAPH_WEB_API_AUTHORISED_NETWORKS: $TOPOLOGRAPH_WEB_API_AUTHORISED_NETWORKS
SWAGGER_HOST: 'localhost:$TOPOLOGRAPH_PORT'
depends_on:
- mongodb
networks:
- frontend
- backend
mongodb:
image: mongo:4.0.8
container_name: mongodb
restart: unless-stopped
command: mongod --auth
environment:
MONGO_INITDB_ROOT_USERNAME: $MONGODB_USERNAME
MONGO_INITDB_ROOT_PASSWORD: $MONGODB_PASSWORD
MONGO_INITDB_DATABASE: $MONGODB_DATABASE
MONGODB_DATA_DIR: /data/db
MONDODB_LOG_DIR: /dev/null
volumes:
- mongodbdata:/data/db
networks:
- backend
webserver:
image: nginx:latest
container_name: webserver
restart: unless-stopped
command: ["nginx", "-g", "daemon off;"]
environment:
NGINX_PORT: 8079
ports:
- "$TOPOLOGRAPH_PORT:8079"
volumes:
- type: volume
source: nginxdata
target: /var/log/nginx
- type: bind
source: ./webserver/templates/app.conf.template
target: /etc/nginx/templates/app.conf.template
depends_on:
- flask
networks:
- frontend
networks:
frontend:
driver: bridge
backend:
name: topolograph_backend
driver: bridge
volumes:
mongodbdata:
driver: local
nginxdata:
driver: local