refactor: reorganize with some changes the docker images and manage.sh

This commit is contained in:
Andrey Antukh 2019-06-03 16:53:31 +02:00
parent 3b648f5aa5
commit a2c41cf9a7
20 changed files with 321 additions and 198 deletions

View file

@ -0,0 +1,41 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
# Frontend
location / {
root /usr/share/nginx/html/;
try_files $uri /index.html;
gzip on;
gzip_types text/css text/javascript application/x-javascript application/javascript application/json;
add_header Cache-Control "max-age=15552000" always;
}
location /view {
alias /usr/share/nginx/html/view;
}
location /media {
alias /srv/uxbox/media;
}
location /static {
alias /srv/uxbox/static;
}
# Backend
location /api/ {
proxy_pass http://uxbackend:6060/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

View file

@ -0,0 +1,3 @@
log_format gzip '[$time_local] ' '"$request" $status $bytes_sent';
access_log /dev/stdout;
charset utf-8;