This guide explains how to deploy the app to production.
When the docker containers are not running yet, copy the compose files and start the containers.
cd infrastructure/03-deploy
scp -r * n8n-shortlink-infra:~/.n8n-shortlink/deploy/
ssh n8n-shortlink-infra
docker-compose --file ~/.n8n-shortlink/deploy/docker-compose.monitoring.yml up --detach
docker-compose --file ~/.n8n-shortlink/deploy/docker-compose.yml --profile production up --detach
Log in to https://grafana.domain.com
with admin/admin
credentials and set a new secure password for the Grafana admin user.
When the docker containers are already running, release a new version of the image.
- Ensure local and remote
master
branches are in sync:
git fetch origin
git status
# -> Your branch is up to date with 'origin/master'.
- Create a tag (following semver) and push it to remote:
git tag v1.2.3
git push origin v1.2.3
This tag push triggers the release
workflow. On completion, the new image is listed on GHCR. Watchtower will discover the image and deploy it to production.
Watchtower polls every six hours. To prompt Watchtower to check immediately:
ssh n8n-shortlink-infra "docker kill --signal=SIGHUP watchtower"
Then wait for Watchtower to pull the new image and start the container, and check that the new version is deployed:
ssh n8n-shortlink-infra "docker ps | grep n8n-shortlink"