diff --git a/Dockerfile b/Dockerfile index ac02d80..8a63b97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM apps2reg:5000/dpedu/nexus +FROM dockermirror:5000/dpedu/nexus ADD makedirs /start.d/ -ADD scripts/ /data/scripts/ +ADD scripts/ /usr/share/backupdb/ ADD crontab /etc/cron.d/backupdb +ADD default /etc/nginx/sites-available/default diff --git a/default b/default index 8e6cc11..804a20b 100644 --- a/default +++ b/default @@ -1,17 +1,24 @@ server { listen 80 default_server; - #listen [::]:80 default_server ipv6only=on; + listen [::]:80 default_server ipv6only=on; - root /nexus/; + root /data/data/; index index.html index.htm; server_name localhost; - client_body_temp_path /nexus/datadb/tmp/; + + client_body_temp_path /data/data/datadb/tmp/; + fastcgi_temp_path /data/data/datadb/tmp/; + proxy_temp_path /data/data/datadb/tmp/; + + #auth_basic "Restricted"; + #auth_basic_user_file /data/htpasswd; location / { autoindex on; try_files $uri $uri/ =404; } + location /cgi-bin/ { alias /usr/share/backupdb/; gzip off; @@ -22,4 +29,8 @@ server { fastcgi_send_timeout 600s; client_max_body_size 0; } + + location /api/ { + rewrite ^/api/(.*) /cgi-bin/$1; + } }