Commit db1939c9 authored by David Foucher's avatar David Foucher

Add update.sh and twik nginx.conf

parent 4a6a7db0
Pipeline #2300 failed with stage
in 1 minute and 3 seconds
...@@ -27,7 +27,7 @@ server { ...@@ -27,7 +27,7 @@ server {
location /0.7/explorer { location /0.7/explorer {
alias /srv/trefle/backoffice; alias /srv/trefle/backoffice;
index index.html; index index.html;
try_files $uri /0.7/explorer/index.html; try_files $uri /0.7/explorer/index.html;
} }
rewrite /0.7/(.*) /$1 break; rewrite /0.7/(.*) /$1 break;
......
resolver 127.0.0.11 valid=15s;
server { server {
listen 80 default_server; listen 80 default_server;
...@@ -6,8 +7,10 @@ server { ...@@ -6,8 +7,10 @@ server {
client_max_body_size 25M; client_max_body_size 25M;
set $upstream_endpoint trefle;
location @gunicorn-master { location @gunicorn-master {
proxy_pass http://trefle:8000; #proxy_pass http://trefle:8000;
proxy_pass http://$upstream_endpoint:8000;
proxy_redirect off; proxy_redirect off;
proxy_set_header Host $host; proxy_set_header Host $host;
} }
......
#!/bin/bash
echo "[INIT] Scaling trefle up"
docker-compose up -d --scale trefle=2 --no-recreate trefle
echo "[INIT] Remove older continer trefle"
docker stop $(docker ps -n 2 --filter "name=trefle_" -q | tail -1) && docker container prune -f
echo "[INIT] Scaling trefle down"
docker-compose up -d --scale trefle=1 --no-recreate trefle
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment