-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
45 lines (41 loc) · 1.38 KB
/
docker-compose.yaml
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
# Docker Compose will let you run your application locally with multiple containers.
# This should let you emulate the production system on your local workstation.
#
# To run locally:
# docker-compose build
# ssh -L 5022:<ip of pbx>:5022 ssh-jumphost
# docker-compose up --abort-on-container-exit
version: '3'
services:
# This is your app and it will be similar to YAML for the MCI K8s Deployment
app:
build: .
ports:
- "8003:8000"
environment:
APPLICATION_ROOT: /uw01
PBX_COMMAND_TIMEOUT: 300
PBXD_CONF: /home/toolop/pbxd_conf/pbxd_uw01_conf.json
volumes:
- ./pbxd:/home/toolop/app/pbxd # for development mount the local app in the container
- ./pbxd_conf:/home/toolop/pbxd_conf
command: ["-b", ":8000", "--workers", "2", "--timeout", "300",
"--access-logfile", "-", "--log-level", "DEBUG",
"--reload"]
# This emulates your app in the production nginx ingress
nginx:
image: nginx
ports:
- "8000:80"
environment:
# in production you need to restrict access in your nginx config
NGINX_CONFIG: |
server {
listen 80;
location / {
proxy_read_timeout 300s;
proxy_buffering off;
proxy_pass http://app:8000/;
}
}
command: /bin/sh -c "echo $$NGINX_CONFIG > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"