ansible-nas/roles/piwigo/tasks/main.yml
Toben Archer 91fc4301db Fixed the networking.
The container now shows up in traefik correctly. But now it looks
like I may need to setup a database container.
2021-08-17 11:57:54 -05:00

32 lines
1.1 KiB
YAML

---
- name: Create Piwigo Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ piwigo_config_directory }}"
- name: Piwigo Docker Container
docker_container:
name: piwigo
image: linuxserver/piwigo
pull: true
volumes:
- "{{ piwigo_config_directory }}:/config:rw"
- "{{ piwigo_photos }}:/gallery:rw"
ports:
- "{{ piwigo_port }}:80"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ piwigo_user_id }}"
PGID: "{{ piwigo_group_id }}"
VERSION: "{{ piwigo_version }}"
restart_policy: unless-stopped
memory: "{{ piwigo_memory }}"
labels:
traefik.enable: "{{ piwigo_available_externally }}"
traefik.http.routers.piwigo.rule: "Host(`{{ piwigo_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.piwigo.tls.certresolver: "letsencrypt"
traefik.http.routers.piwigo.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.piwigo.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.piwigo.loadbalancer.server.port: "80"