No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-26 21:39:47 +00:00
.gitea/workflows feat: initial version 2026-04-26 22:57:35 +02:00
defaults feat: added git registry auth 2026-04-26 23:39:39 +02:00
meta feat: initial version 2026-04-26 22:57:35 +02:00
tasks feat: added git registry auth 2026-04-26 23:39:39 +02:00
templates feat: added multiple domain support 2026-04-26 23:10:15 +02:00
.gitignore feat: initial version 2026-04-26 22:57:35 +02:00
CHANGELOG.md Prettified Code! 2026-04-26 21:39:47 +00:00
LICENSE feat: initial version 2026-04-26 22:57:35 +02:00
README.md Prettified Code! 2026-04-26 20:58:44 +00:00

docker-app

Deploys a generic Docker service via Docker Compose, routed through Traefik as a reverse proxy.

Requirements

  • Docker
  • community.docker Ansible collection

Variables

Variable Default Description
docker_app_instance docker_app Unique instance name. Used as Compose project name and Traefik router prefix. Change when running multiple instances on the same host.
docker_app_image ~ Container image without tag (e.g. nginx). Required.
docker_app_version latest Image tag. Pin to a specific version in production.
docker_app_name docker_app Container and service name inside the compose file.
docker_app_docker_path /docker/app Host path for the compose.yml file.
docker_app_domain ~ Public domain the app runs on (no protocol prefix). Required. Enables Traefik routing and attaches to the traefik_web network.
docker_app_uninstall false Stops and removes containers and the compose directory.

Usage

Minimal setup:

docker_app_image: "nginx"
docker_app_domain: "app.example.com"

Pinned version with a custom instance name:

docker_app_instance: myapp
docker_app_image: myrepo/myapp
docker_app_version: "1.4.2"
docker_app_name: myapp
docker_app_domain: myapp.example.com
docker_app_docker_path: /docker/myapp

Multiple instances on the same host:

# instance 1
docker_app_instance: app_a
docker_app_image: nginx
docker_app_domain: a.example.com
docker_app_docker_path: /docker/app_a

# instance 2
docker_app_instance: app_b
docker_app_image: caddy
docker_app_domain: b.example.com
docker_app_docker_path: /docker/app_b

Uninstall

To stop and remove all containers and the compose directory:

docker_app_uninstall: true

Notes

  • The container is always attached to the traefik_web external network. Traefik must be running and that network must exist before deploying.
  • TLS is handled by Traefik using the default cert resolver.
  • The compose file is written as root:root with mode 0600.