-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·76 lines (70 loc) · 1.83 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
version: '3'
services:
web:
restart: always
build: ./web
expose:
- "8000"
links:
- mongodb:mongodb
volumes:
- web-data:/usr/src/app/static
environment:
FLASK_DEBUG: 1
DEBUG: 1
SECRET_KEY: 5(15ds+i2+%ik6z&!yer+ga9m:e%jcqiz_5wszg)r-z!2--b2d
DB_NAME: postgres
DB_USER: postgres
DB_PASS: postgres
DB_SERVICE: postgres
DB_PORT: 5432
POSTGRES_VERSION: 9.6-alpine
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: edgviz
COMPOSE_PROJECT_NAME: EDGVIZ
MONGODB_DATABASE: edgedb
MONGODB_USERNAME: edgedbuser
MONGODB_PASSWORD: edgedb
MONGO_URL: mongodb://mongodb:27017
command: /usr/local/bin/gunicorn --access-logfile - --error-logfile - --log-level debug -w 2 -t 120 --graceful-timeout 120 -b :8000 app:app
#command: flask run --host=0.0.0.0 --port=8000
nginx:
restart: always
build: ./nginx
ports:
- "80:80"
volumes:
- .:/www/static
- web-data:/usr/src/app/static
links:
- web:web
mongodb:
image: mongo:4.0.8
restart: always
command: mongod --auth
environment:
MONGO_INITDB_ROOT_USERNAME: mongodbuser
MONGO_INITDB_ROOT_PASSWORD: mdb_user
MONGO_INITDB_DATABASE: edgedb
MONGODB_DATA_DIR: /data/db
MONDODB_LOG_DIR: /dev/null
volumes:
- mongodbdata:/data/db
ports:
- "27017:27017"
# networks:
# - backend
mongoClientTemp:
image: mongo:4.0.8
# restart: never
container_name: mongoClientTemp
links:
- mongodb:mongodb
command: mongo -u mongodbuser -p mdb_user --host mongodb --eval "db.getSiblingDB('edgedb').createUser({user:'edgedbuser', pwd:'edgedb', roles:[{role:'readWrite',db:'edgedb'}]});"
depends_on:
- mongodb
- web
volumes:
web-data:
mongodbdata: