Automated deployment of tibia-mkt to a home server via Ansible.
-
SSH key setup on your Ansible node:
ssh-keygen -t ed25519 -C "ansible" ssh-copy-id -i ~/.ssh/ansible.pub [server-ip]
-
Create
ansible_vault_password.txt(gitignored) with your vault password.
# Full deployment (build + deploy + migrate + health check)
make run
# Build artifact only (localhost)
make build-only
# Deploy without rebuilding (uses existing artifact)
make deploy-no-build
# Update env vars and restart containers only
make config-only
# Run pre-flight checks only
make preflightOr with tags directly:
ansible-playbook tibia-mkt-playbook.yml -i inventory.yml \
-e @ansible_vault.enc --key-file ~/.ssh/ansible \
--ask-become-pass --vault-password-file ansible_vault_password.txt \
--tags "deploy,health"To encrypt or re-encrypt the vault file:
ansible-vault encrypt ansible_vault.enc| Role | Runs On | Purpose |
|---|---|---|
pre-flight |
Remote | Connectivity, disk space, DB reachability |
tibia-mkt-zip |
Localhost | Create deployment artifact |
docker-install |
Remote | Install Docker Engine + plugins |
tibia-mkt-build |
Remote | Extract artifact, backup old deployment |
tibia-mkt-set-env-vars |
Remote | Generate .env (mode 0600) |
tibia-mkt-run |
Remote | Docker compose down/up |
tibia-mkt-run-migrations |
Remote | Run PostgreSQL migrations (idempotent) |
health-check |
Remote | Verify containers + app health |
cleanup |
Remote | Remove temp files |