34 lines
1.1 KiB
YAML
34 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
|