add static stack

start using remote docker hosts to deploy
This commit is contained in:
Pim Kunis 2023-05-20 12:13:29 +02:00
parent f7fa131fd8
commit 57d66c8afa
4 changed files with 36 additions and 0 deletions

4
ansible/README.md Normal file
View file

@ -0,0 +1,4 @@
# shoarma ansible
This requires a rootless docker daemon on the Ansible host.
See: https://docs.docker.com/engine/security/rootless/

View file

@ -17,3 +17,4 @@
- {role: shephard, tags: shephard} - {role: shephard, tags: shephard}
- {role: jitsi, tags: jitsi} - {role: jitsi, tags: jitsi}
- {role: pihole, tags: pihole} - {role: pihole, tags: pihole}
- {role: static, tags: static}

View file

@ -0,0 +1,23 @@
# vi: ft=yaml
version: '3'
networks:
traefik:
external: true
services:
static:
image: git.pim.kunis.nl/pim/concourse-test:latest
networks:
- traefik
deploy:
placement:
constraints:
- "node.labels.public == true"
labels:
- traefik.enable=true
- traefik.http.routers.static.entrypoints=websecure
- traefik.http.services.static.loadbalancer.server.port=80
- traefik.http.routers.static.rule=Host(`pim.kunis.nl`)
- traefik.http.routers.static.tls=true
- traefik.http.routers.static.tls.certresolver=letsencrypt

View file

@ -0,0 +1,8 @@
- name: Deploy Docker stack
docker_stack:
name: static
compose:
- "{{ lookup('template', '{{ role_path }}/docker-stack.yml.j2') | from_yaml }}"
environment:
DOCKER_HOST: ssh://root@maestro.dmz
delegate_to: localhost