blog.lazkani.io/ansible/roles/blog/tasks/main.yml
Elia el Lazkani 1959600bb1
Some checks failed
continuous-integration/drone/push Build is failing
fix(): Fixes role directory structure
2023-07-01 18:24:30 +02:00

33 lines
1.1 KiB
YAML

---
- name: Deploy Blog Stack
community.docker.docker_compose:
project_name: Blog
state: present
definition:
version: '3'
services:
blog:
container_name: blog
image: "scm.project42.io/elia/blog:{{ blog_container_tag }}"
restart: unless-stopped
networks:
- traefik-ingress
environment:
- "NGINX_PORT={{ blog_http_port }}"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-ingress"
- "traefik.http.routers.blog.rule=Host(`blog.lazkani.io`)"
- "traefik.http.routers.blog.service=blog"
- "traefik.http.services.blog.loadbalancer.server.port={{ blog_http_port }}"
- "traefik.http.middlewares.weechat-main.chain.middlewares=frame-deny,browser-xss-filter,ssl-redirect"
- "traefik.http.routers.blog.tls.certresolver=cloudflareresolver"
networks:
traefik-ingress:
external: true
register: output_blog
- assert:
that:
- output_blog.services.blog.blog.state.running