Commit initial
This commit is contained in:
commit
b8a138b80a
6 changed files with 125 additions and 0 deletions
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Role : docker_wekan
|
||||
|
||||
## Services fournis
|
||||
|
||||
Installation de wekan sur un serveur docker_host
|
||||
|
||||
## Variables
|
||||
|
||||
```yaml
|
||||
docker_wekan_fqdn: wekan.example.com
|
||||
docker_wekan_version: wekanteam/wekan:v7.33
|
||||
docker_wekan_data_dir: /data1
|
||||
docker_wekan_service_id: wekan_example_com
|
||||
docker_wekan_custom_env: |
|
||||
- WITH_API=true
|
||||
- RICHER_CARD_COMMENT_EDITOR=true
|
||||
- BIGEVENTS_PATTERN=NONE
|
||||
- CARD_OPENED_WEBHOOK_ENABLED=false
|
||||
- MAIL_URL=smtp://mail.axamplecom:587
|
||||
- MAIL_FROM=Wekan Notifications <wekan@example.com>
|
||||
- MAIL_SERVICE_USER=wekan@example.com
|
||||
- MAIL_SERVICE_PASSWORD=lemotmotdepasse
|
||||
|
||||
```
|
||||
|
||||
| Option | Valeur par défaut | Description |
|
||||
|-------------------------------|-----------------------|-------------------------------------------------------------------------------------------|
|
||||
| docker_wekan_fqdn | | Le nom de domaine pour lequel le service wekan répond |
|
||||
| docker_wekan_version | | La version de l'image docker wekan |
|
||||
| docker_wekan_data_dir | | L'emplacement dans lequel se trouvent les volumes de donnees docker pour le service |
|
||||
| docker_wekan_service_id | | Le nom de service souhaité : conditionne le nommage des volumes et le routage par traefik |
|
||||
| docker_wekan_custom_env | cf. defaults/main.yml | Ensemble de variables d'environnement qui peuvent être passées à Wekan pour le configurer |
|
||||
|
||||
|
||||
## Premier démarrage dans wekan
|
||||
|
||||
* Le premier utilisateur enregistré sera administrateur de l'instance wekan.
|
||||
* Depuis l'interface administrateur, envisager de désactiver l'auto inscription (paramètres/inscription).
|
5
defaults/main.yml
Normal file
5
defaults/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
docker_wekan_custom_env: |
|
||||
- WITH_API=true
|
||||
- RICHER_CARD_COMMENT_EDITOR=true
|
||||
- BIGEVENTS_PATTERN=NONE
|
||||
- CARD_OPENED_WEBHOOK_ENABLED=false
|
5
handlers/main.yml
Normal file
5
handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: docker-compose-up
|
||||
shell: |
|
||||
docker compose up -d
|
||||
args:
|
||||
chdir: /opt/{{ docker_wekan_service_id }}/
|
8
meta/main.yml
Normal file
8
meta/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
galaxy_info:
|
||||
author: Olivier Navas
|
||||
description: Modèle d'installation Libretic pour wekan
|
||||
license: GPL-3.0-only
|
||||
min_ansible_version: 2.9
|
||||
galaxy_tags: []
|
||||
|
||||
dependencies: []
|
18
tasks/main.yml
Normal file
18
tasks/main.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
- name: docker directory
|
||||
file:
|
||||
path: /opt/{{ docker_wekan_service_id }}/
|
||||
state: directory
|
||||
|
||||
- name: docker data directory
|
||||
file:
|
||||
path: "{{ docker_wekan_data_dir }}/{{ docker_wekan_service_id }}/"
|
||||
state: directory
|
||||
register: _datadir
|
||||
|
||||
- name: prepare docker-compose.yml and files
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: /opt/{{ docker_wekan_service_id }}/
|
||||
with_items:
|
||||
- docker-compose.yml
|
||||
notify: docker-compose-up
|
51
templates/docker-compose.yml
Normal file
51
templates/docker-compose.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
wekan:
|
||||
image: {{ docker_wekan_image_version }}
|
||||
restart: always
|
||||
environment:
|
||||
- WRITABLE_PATH=/data
|
||||
- MONGO_URL=mongodb://db:27017/wekan
|
||||
- ROOT_URL=https://{{ docker_wekan_fqdn }}
|
||||
- BROWSER_POLICY_ENABLED=true
|
||||
{{ docker_wekan_custom_env | indent(6, False) }}
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- {{ docker_wekan_data_dir }}/{{ docker_wekan_service_id }}/wekan-files:/data
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.docker.network: "traefik"
|
||||
traefik.http.routers.{{ docker_wekan_service_id }}.entrypoints: "web"
|
||||
traefik.http.routers.{{ docker_wekan_service_id }}.rule: "Host(`{{ docker_wekan_fqdn }}`)"
|
||||
traefik.http.services.{{ docker_wekan_service_id }}.loadbalancer.server.port: "8080"
|
||||
networks:
|
||||
- traefik
|
||||
- wekan
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mongo:6
|
||||
restart: always
|
||||
# command: mongod --oplogSize 128
|
||||
# Syslog: mongod --syslog --oplogSize 128 --quiet
|
||||
# Disable MongoDB logs:
|
||||
command: mongod --logpath /dev/null --oplogSize 128 --quiet
|
||||
networks:
|
||||
- wekan
|
||||
expose:
|
||||
- 27017
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- {{ docker_wekan_data_dir }}/{{ docker_wekan_service_id }}/wekan-db:/data/db
|
||||
- {{ docker_wekan_data_dir }}/{{ docker_wekan_service_id }}/wekan-db-dump:/dump
|
||||
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
wekan:
|
||||
internal: true
|
Loading…
Reference in a new issue