forked from medianetlab/NEF_emulator
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
128 lines (114 loc) · 2.87 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
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
122
123
124
125
126
127
128
version: "3.9"
services:
db:
image: postgres:12
command: -c shared_buffers=256MB -c max_connections=200
profiles: ["debug", "dev"]
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
env_file:
- .env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
networks:
- services_default
pgadmin:
image: dpage/pgadmin4
profiles: ["debug"]
ports:
- "5050:5050"
volumes:
- ./pgadmin/servers.json:/pgadmin4/servers.json
env_file:
- .env
logging:
driver: none
networks:
- services_default
mongo_nef:
image: mongo:4.4.10
profiles: ["debug", "dev"]
volumes:
- app-mongo-db-data:/data/db
restart: always
env_file:
- .env
environment:
MONGO_INITDB_ROOT_USERNAME: "${MONGO_USER}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_PASSWORD}"
networks:
- services_default
mongo-express:
image: mongo-express:1.0.0-alpha.4
profiles: ["debug"]
restart: always
ports:
- 8081:8081
env_file:
- .env
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: "${MONGO_USER}"
ME_CONFIG_MONGODB_ADMINPASSWORD: "${MONGO_PASSWORD}"
ME_CONFIG_MONGODB_URL: mongodb://${MONGO_USER}:${MONGO_PASSWORD}@mongo_nef:27017/
ME_CONFIG_MONGODB_ENABLE_ADMIN: "${MONGO_EXPRESS_ENABLE_ADMIN}"
networks:
- services_default
backend:
image: '${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}'
profiles: ["debug", "dev"]
command: /start-reload.sh
volumes:
- ./backend/app:/app
env_file:
- .env
environment:
- SERVER_NAME=${DOMAIN?Variable not set}
- SERVER_HOST=https://${DOMAIN?Variable not set}
# Allow explicit env var override for tests
- SMTP_HOST=${SMTP_HOST}
build:
context: ./backend
dockerfile: Dockerfile.backend
args:
INSTALL_DEV: ${INSTALL_DEV-true}
INSTALL_JUPYTER: ${INSTALL_JUPYTER-true}
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
networks:
- services_default
reverse_proxy:
build:
context: nginx
dockerfile: Dockerfile.nginx
image: nginx-nef
restart: unless-stopped
env_file: .env
environment:
APP_ENV: "prod"
APP_NAME: "webserver"
APP_DEBUG: "false"
SERVICE_NAME: "webserver"
hostname: ${NEF_HOST}
ports:
- "${NGINX_HTTP}:80"
- "${NGINX_HTTPS}:443"
volumes:
- nginxdata:/var/log/nginx
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- ./nginx/certs:/etc/nginx/certs
depends_on:
- backend
- mongo_nef
- db
networks:
- services_default
command: sh -c '/self-signed-crt.sh && /dynamic_ports.sh'
networks:
services_default:
external: ${EXTERNAL_NET}
volumes:
app-db-data:
pgadmin-data:
app-mongo-db-data:
nginxdata: