feat(panopticon): add version as container label

This commit is contained in:
Vincent Wilke 2020-06-28 17:40:27 +02:00 committed by Johanna Dorothea Reichmann
parent deca0d7f85
commit b280996a62
No known key found for this signature in database
GPG key ID: 03624C433676E465
3 changed files with 14 additions and 5 deletions

View file

@ -1,9 +1,12 @@
---
# defaults file for panopticon
panopticon_db_version: "10.5.4"
panopticon_db_user: panopticon
panopticon_db_name: panopticon
panopticon_db_host: mariadb
panopticon_db_port: 3306
panopticon_db_docker_labels: {} #override this
panopticon_version: "no version yet"
panopticon_docker_ports: []
panopticon_docker_labels: {}
panopticon_docker_labels: {} #override this

View file

@ -4,7 +4,7 @@
become: yes
docker_container:
name: panopticon-db
image: docker.io/mariadb:10
image: "docker.io/mariadb:{{ panopticon_db_version }}"
volumes:
- /opt/panopticon/database:/var/lib/mysql
env:
@ -13,16 +13,17 @@
MYSQL_USER: "{{ panopticon_db_user }}"
MYSQL_PASSWORD: "{{ panopticon_db_password }}"
restart_policy: unless-stopped
labels: "{{ panopticon_db_docker_labels_complete }}"
- name: launch panopticon
become: yes
docker_container:
name: panopticon
image: registry.gitlab.com/famedly/container/panopticon
image: registry.gitlab.com/famedly/containers/panopticon
pull: true
links:
- panopticon-db:mariadb
labels: "{{ panopticon_docker_labels }}"
labels: "{{ panopticon_docker_labels_complete }}"
ports: "{{ panopticon_docker_ports }}"
env:
PANOPTICON_DB_DRIVER: mysql

View file

@ -1,4 +1,9 @@
---
# vars file for panopticon
panopticon_db_dsn: "{{ panopticon_db_user }}:{{ panopticon_db_password }}@tcp({{ panopticon_db_host }}:{{ panopticon_db_port }})/{{ panopticon_db_name }}"
panopticon_db_docker_labels_complete: "{{ panopticon_db_docker_labels_base | combine(panopticon_db_docker_labels, recursive=True) }}"
panopticon_db_docker_labels_base:
version: "{{ panopticon_db_version }}"
panopticon_docker_labels_complete: "{{ panopticon_docker_labels_base | combine(panopticon_docker_labels) }}"
panopticon_docker_labels_base:
version: "{{ panopticon_version }}"