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