##// END OF EJS Templates
jespinoza -
r12:32027bfc803c merge
parent child
Show More
@@ -1,3 +1,4
1 1 MADROOT=/madrigal
2 EXP_DIR=/usr/local/experiments
3 MAD_PORT=8080
2 EXP_DIR=/data/madrigal/experiments
3 META_DIR=/data/madrigal/metadata
4 MAD_PORT=80
@@ -1,27 +1,28
1 1 version: '3'
2 2
3 3 services:
4 4 web:
5 5 container_name: 'madrigal'
6 6 build: .
7 7 restart: always
8 8 image: madrigal
9 9 working_dir: /madrigal/source/madpy/djangoMad
10 command: gunicorn djangoMad.wsgi --bind 0.0.0.0:8000
10 command: gunicorn djangoMad.wsgi --timeout 600 --bind 0.0.0.0:8000
11 11 env_file: .env
12 12 volumes:
13 13 - '${EXP_DIR}:/madrigal/experiments'
14 - '${META_DIR}:/madrigal/metadata'
14 15 - './source/madpy/djangoMad:/madrigal/source/madpy/djangoMad'
15 16
16 17 nginx:
17 18 container_name: 'madrigal-nginx'
18 19 image: nginx:1.15-alpine
19 20 volumes:
20 21 - ./source/madpy/djangoMad/static_files:/static
21 22 - ./nginx:/etc/nginx/conf.d
22 23 ports:
23 24 - "${MAD_PORT}:8080"
24 25 depends_on:
25 26 - web
26 27 command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
27 28
@@ -1,22 +1,26
1 1 # configuration
2 2
3 3 upstream djangomad {
4 4 server web:8000;
5 5 }
6 6
7 7 server {
8 8 listen 8080;
9 client_max_body_size 50M;
9 client_max_body_size 100M;
10 10
11 11 location /madrigal {
12 12 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
13 13 proxy_set_header Host $host;
14 14 proxy_redirect off;
15 15 proxy_set_header X-Script-Name /madrigal;
16 16 proxy_pass http://djangomad;
17 17 }
18 18
19 19 location /madrigal/static/ {
20 20 alias /static/;
21 21 }
22 proxy_connect_timeout 600;
23 proxy_send_timeout 600;
24 proxy_read_timeout 600;
25 send_timeout 600;
22 26 }
General Comments 0
You need to be logged in to leave comments. Login now