72 lines
No EOL
1.7 KiB
Markdown
72 lines
No EOL
1.7 KiB
Markdown
# Role: deploy_container_traefik
|
||
|
||
## Purpose
|
||
This role deploys and configures a Healthchecks.io Container with Docker Compose
|
||
|
||
## Variables
|
||
|
||
### Default Variables (`defaults/main.yml`)
|
||
```yaml
|
||
container_healthchecks_domain: health.example.com
|
||
container_healthchecks_version: v3.10
|
||
container_healthchecks_email_from: "healthchecks@your.domain.com"
|
||
container_healthchecks_email_host: smtp.your.domain.com
|
||
container_healthchecks_email_password: your_email_password
|
||
container_healthchecks_email_user: healthchecks@your.domain.com
|
||
container_healthchecks_email_port: 587
|
||
container_healthchecks_email_tls: true
|
||
container_healthchecks_email_user_verification: true
|
||
container_healthchecks_secret_key: your_secret_key
|
||
container_healthchecks_site_name: "Healthchecks"
|
||
```
|
||
|
||
### Secret Key Generation
|
||
Generate a secure secret key for Django
|
||
You can use
|
||
´´´
|
||
python3 -c "import secrets; print(secrets.token_urlsafe(50))"
|
||
´´´
|
||
to generate a new key or use an online Generator like https://djecrety.ir/
|
||
|
||
### Static Variables (`vars/main.yml`)
|
||
```yaml
|
||
container_base_dir: /opt/docker/healthchecks
|
||
```
|
||
|
||
### Role Usage
|
||
|
||
```yaml
|
||
- name: Deploy Healthchecks.io container
|
||
hosts: docker
|
||
roles:
|
||
- role: deploy_container_healthchecks
|
||
```
|
||
|
||
## Requirements
|
||
|
||
* Linux system (tested on Debian)
|
||
* Docker Engine
|
||
* Docker Compose v2 plugin (`docker compose` CLI)
|
||
* Ansible 2.11 or higher
|
||
* `community.docker` collection
|
||
|
||
Install the required collection:
|
||
|
||
```bash
|
||
ansible-galaxy collection install community.docker
|
||
```
|
||
|
||
Or via `requirements.yml`:
|
||
|
||
```yaml
|
||
collections:
|
||
- name: community.docker
|
||
version: ">=3.4.0"
|
||
```
|
||
|
||
## Authors
|
||
|
||
* Kevin Heyer
|
||
📧 [kevin.heyer@wira-gmbh.de](mailto:kevin.heyer@wira-gmbh.de)
|
||
|
||
``` |