1
0
Fork 0

Add portfolio

This commit is contained in:
Florian RICHER 2023-11-21 21:24:27 +01:00
parent 1ea0ffc68c
commit 020008071b
4 changed files with 55 additions and 0 deletions

View file

@ -21,4 +21,5 @@
- { role: iptables, tags: ["iptables"] }
- { role: borg, tags: ["borg"] }
- { role: watchtower, tags: ["watchtower"] }
- { role: portfolio, tags: ["portfolio"] }
- { role: clean, tags: ["clean"] }

View file

@ -0,0 +1,22 @@
---
- name: Check portfolio directory exist
ansible.builtin.file:
path: portfolio
state: directory
- name: Copy template conf
ansible.builtin.template:
src: "{{ item.src }}"
dest: "portfolio/{{ item.dest }}"
loop:
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
register: portfolio_copy_templates_results
- name: Update and restart container
community.docker.docker_compose:
project_src: portfolio
state: present
pull: true
restarted: "{{ portfolio_copy_templates_results.changed }}"
become: true

View file

@ -0,0 +1,4 @@
---
- ansible.builtin.import_tasks: base.yml
name: base

View file

@ -0,0 +1,28 @@
version: "3"
services:
portfolio:
image: gitea.mrdev023.fr/mrdev023/portfolio:latest
container_name: portfolio
restart: unless-stopped
networks:
- proxy
labels:
- traefik.enable=true
- traefik.docker.network=proxy
# HTTP Reverse proxy portfolio
- traefik.http.routers.portfolio-secure.entrypoints=https
- traefik.http.routers.portfolio-secure.rule=Host(`{{ server.domain }}`)
- traefik.http.routers.portfolio-secure.tls=true
- traefik.http.routers.portfolio-secure.tls.certresolver=sslResolver
- traefik.http.routers.portfolio-secure.service=portfolio
- traefik.http.services.portfolio.loadbalancer.server.port=8080
logging:
driver: loki
options:
loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push"
mode: non-blocking
networks:
proxy:
external: true