This repository is a complete traefik stack able to be deployed in minutes
It uses the following tools to accomplish that: Ansible, GitHub Actions
There are a few prerequisites before deployment.
1 - GitHub secrets for usage
To create GitHub secrets follow this link: https://docs.github.com/en/actions/security-guides/encrypted-secrets
The following secrets are used for deployment:
2 - Target server(s) reachable via ssh over the internet
Also make sure that your forked repo has the right inventory secrets defined. If not, the intergrate.yml pipeline can't run on the target server(s)
The intergrate.yml can be found under: ./FORKED REPO/.github/workflows
Feel free to add, or change the ansible deployment script according to your needs. Do not forget to change the traefik URL in the docker-compose file, to a C-NAME record which points to your public IP using DynDNS (DDNS)
3 - Env file for deployment Make sure to define a .env file in the Root with the following schema:
url=subdomain.domainname
port=port to your traefik service
domain=FQDN
4 - create docker networks for manual deployment Make sure to manually create the networks traefik will use before the manual deployment.
Fork this project with GitHub
git clone git@github.com:USERNAME/FORKED-PROJECT.git
cd /path/to/FORKED-PROJECT
To deploy this project run
git push <REMOTENAME> master
The master branch will trigger the pipeline for deployment. Or you can dispatch the workflow by going to:
Select the work flow you want to trigger and press the blue underscored button.
Another way to create a deployment is to download the following file: /deployments/deployment.yml Make sure Ansible is installed on the target server and change the variables in my ansible script to reflect your own environment (like the become user)