✨ Add redmine setup to pottwal
This setup comes from the Antiblau server and mimics the situation there.
This commit is contained in:
parent
e924da8c3b
commit
208245c4c5
1 changed files with 70 additions and 0 deletions
70
pottwal.yml
70
pottwal.yml
|
@ -19,6 +19,11 @@
|
||||||
hedgedoc_host_port: 8084
|
hedgedoc_host_port: 8084
|
||||||
hedgedoc_image: quay.io/hedgedoc/hedgedoc:1.9.3
|
hedgedoc_image: quay.io/hedgedoc/hedgedoc:1.9.3
|
||||||
|
|
||||||
|
redmine_host_port: 8087
|
||||||
|
redmine_image: redmine:4.2.7
|
||||||
|
redmine_mysql_image: mysql:5.7
|
||||||
|
redmine_database: redmine
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: docker_setup
|
- role: docker_setup
|
||||||
vars:
|
vars:
|
||||||
|
@ -38,6 +43,7 @@
|
||||||
alternate_names:
|
alternate_names:
|
||||||
- conference.jabber.n39.eu
|
- conference.jabber.n39.eu
|
||||||
deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs"
|
deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs"
|
||||||
|
- name: redmine.n39.eu
|
||||||
- role: penguineer.dehydrated_cron
|
- role: penguineer.dehydrated_cron
|
||||||
- role: dd24-dyndns-cron
|
- role: dd24-dyndns-cron
|
||||||
# variables are set in the inventory
|
# variables are set in the inventory
|
||||||
|
@ -253,4 +259,68 @@
|
||||||
proxy_port: "{{ hedgedoc_host_port }}"
|
proxy_port: "{{ hedgedoc_host_port }}"
|
||||||
|
|
||||||
|
|
||||||
|
# Expected setup for the data directory
|
||||||
|
# file: configuration.yml
|
||||||
|
# directory: mysql
|
||||||
|
# directory: files
|
||||||
|
# directory: themes
|
||||||
|
- name: Check if redmine data dir exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ data_dir }}/redmine"
|
||||||
|
register: redmine_dir
|
||||||
|
- name: Fail if redmine data dir does not exist
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "Redmine data dir is missing, please restore from the backup!"
|
||||||
|
when: not redmine_dir.stat.exists
|
||||||
|
|
||||||
|
- name: Setup Redmine docker network
|
||||||
|
docker_network:
|
||||||
|
name: redminenet
|
||||||
|
state: present
|
||||||
|
internal: true
|
||||||
|
|
||||||
|
- name: Setup Redmine MySQL container
|
||||||
|
docker_container:
|
||||||
|
name: redminedb
|
||||||
|
image: "{{ redmine_mysql_image }}"
|
||||||
|
pull: true
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
detach: yes
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: "{{ redmine_database_password }}"
|
||||||
|
MYSQL_DATABASE: "{{redmine_database }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ data_dir }}/redmine/mysql:/var/lib/mysql"
|
||||||
|
networks:
|
||||||
|
- name: redminenet
|
||||||
|
|
||||||
|
- name: Setup Redmine container
|
||||||
|
docker_container:
|
||||||
|
name: redmine
|
||||||
|
image: "{{ redmine_image }}"
|
||||||
|
pull: true
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
detach: yes
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:{{ redmine_host_port }}:3000"
|
||||||
|
env:
|
||||||
|
REDMINE_DB_MYSQL: redminedb
|
||||||
|
REDMINE_DB_PASSWORD: "{{ redmine_database_password }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ data_dir }}/redmine/configuration.yml:/usr/src/redmine/config/configuration.yml"
|
||||||
|
- "{{ data_dir }}/redmine/files:/usr/src/redmine/files"
|
||||||
|
- "{{ data_dir }}/redmine/themes:/usr/src/redmine/public/themes"
|
||||||
|
networks:
|
||||||
|
- name: redminenet
|
||||||
|
|
||||||
|
- name: Setup proxy site redmine.n39.eu
|
||||||
|
include_role:
|
||||||
|
name: setup-http-site-proxy
|
||||||
|
vars:
|
||||||
|
site_name: redmine.n39.eu
|
||||||
|
proxy_port: "{{ redmine_host_port }}"
|
||||||
|
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
|
|
Loading…
Reference in a new issue