# HG changeset patch # User ymh # Date 1543585759 -3600 # Node ID aac6db7cea99fba67b4dce4f06bcc460712713ad # Parent f8f3af9e5c83251c72e45e75b83b530c72b23409 first version of deploy script + set version to 0.1.0 diff -r f8f3af9e5c83 -r aac6db7cea99 deploy/deploy.yml --- a/deploy/deploy.yml Fri Nov 30 10:53:15 2018 +0100 +++ b/deploy/deploy.yml Fri Nov 30 14:49:19 2018 +0100 @@ -105,7 +105,7 @@ chdir: "{{client_dir}}" environment: REACT_APP_API_ROOT_URL: "{{backend_base_url}}" - REACT_APP_BASENAME: "{{backend_base_url}}" + REACT_APP_BASENAME: "{{static_url_base}}" REACT_APP_NETWORK_STATUS_INTERVAL: "{{network_status_interval}}" REACT_APP_NETWORK_STATUS_TIMEOUT: "{{network_status_timeout}}" REACT_APP_SYNC_INTERVAL: "{{sync_interval}}" diff -r f8f3af9e5c83 -r aac6db7cea99 deploy/group_vars/group_vars.yml.tmpl --- a/deploy/group_vars/group_vars.yml.tmpl Fri Nov 30 10:53:15 2018 +0100 +++ b/deploy/group_vars/group_vars.yml.tmpl Fri Nov 30 14:49:19 2018 +0100 @@ -18,6 +18,9 @@ # static file domain static_server_name: "" +# static url base +static_url_base: "" + # Remote static nginx service static_http_service: "nginx" diff -r f8f3af9e5c83 -r aac6db7cea99 deploy/templates/nginx.static.conf.j2 --- a/deploy/templates/nginx.static.conf.j2 Fri Nov 30 10:53:15 2018 +0100 +++ b/deploy/templates/nginx.static.conf.j2 Fri Nov 30 14:49:19 2018 +0100 @@ -30,15 +30,15 @@ include /etc/nginx/uwsgi_params; } - location /backend/static { + location {{'/' if static_url_base=='' else static_url_base}}backend/static { alias {{backend_nginx_static_root}}; # backend static files } - location /backend/media { + location {{'/' if static_url_base=='' else static_url_base}}backend/media { alias {{backend_nginx_media_root}}; # backend media files } - location / { + location {{'/' if static_url_base=='' else static_url_base}} { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.html; diff -r f8f3af9e5c83 -r aac6db7cea99 src/irinotes/__init__.py --- a/src/irinotes/__init__.py Fri Nov 30 10:53:15 2018 +0100 +++ b/src/irinotes/__init__.py Fri Nov 30 14:49:19 2018 +0100 @@ -1,5 +1,4 @@ -VERSION = (0, 0, 1, "final", 0) - +VERSION = (0, 1, 0, 'final', 0) VERSION_STR = ".".join(map(lambda i:"%02d" % (i,), VERSION[:2])) ###