diff --git a/docs/development.md b/docs/development.md index cd3391f..b715c77 100644 --- a/docs/development.md +++ b/docs/development.md @@ -86,3 +86,13 @@ Here is another example using shell environment variables defined when starting ``` SERVER_NAME=busmap.online HOST_NAME=busmap.online docker compose -f compose.yaml up --attach-dependencies stage ``` + +### Rebuilding in Production + +To rebuild images and recreate containers while already running on production server: + +1. `cd code/busmap` +2. `git pull origin main` +3. `docker compose -f compose.yaml -f compose.production.yaml up -d --build stage` +4. `docker builder prune -a` (instance has little drive space, so this is essential) +5. Optionally remove any dangling images too, `docker image prune`. diff --git a/packages/web/templates/default.conf.template b/packages/web/templates/default.conf.template index e595a83..0d5b2a5 100644 --- a/packages/web/templates/default.conf.template +++ b/packages/web/templates/default.conf.template @@ -1,8 +1,11 @@ # Configuration to stage a production build. server { + listen 443 ssl; + http2 on; server_name test.busmap.online; server_tokens off; + include /etc/nginx/conf.d/core/ssl.conf; return 301 https://try.busmap.online$request_uri; }