Initial commit
This commit is contained in:
commit
d14bebbf1a
6 changed files with 87 additions and 0 deletions
30
README.md
Normal file
30
README.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Role : docker_dokuwiki
|
||||
|
||||
|
||||
## Services fournis
|
||||
|
||||
Installation de dokuwiki sur un serveur docker_host
|
||||
|
||||
|
||||
## Variables
|
||||
|
||||
Fournir les variables suivantes. Par exemple :
|
||||
|
||||
```yaml
|
||||
docker_dokuwiki_fqdn: dokuwiki.example.com
|
||||
docker_dokuwiki_version: lscr.io/linuxserver/dokuwiki:latest
|
||||
docker_dokuwiki_data_dir: /data1
|
||||
docker_dokuwiki_service_id: dokuwiki_example_com
|
||||
```
|
||||
|
||||
| Option | Valeur par défaut | Description |
|
||||
|----------------------------------|-------------------|-------------------------------------------------------------------------------------------|
|
||||
| docker_dokuwiki_fqdn | | Le nom de domaine pour lequel le service dokuwiki répond |
|
||||
| docker_dokuwiki_version | | La version de l'image docker dokuwiki |
|
||||
| docker_dokuwiki_data_dir | | L'emplacement dans lequel se trouvent les volumes de donnees docker pour le service |
|
||||
| docker_dokuwiki_service_id | | Le nom de service souhaité : conditionne le nommage des volumes et le routage par traefik |
|
||||
|
||||
|
||||
## Premier démarrage dans dokuwiki
|
||||
|
||||
Se connecter à dokuwiki à l'url /install.php pour configurer l'utilisateur admin et les premiers paramètres.
|
0
defaults/main.yml
Normal file
0
defaults/main.yml
Normal file
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_dokuwiki_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 dokuwiki
|
||||
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_dokuwiki_service_id }}/
|
||||
state: directory
|
||||
|
||||
- name: docker data directory
|
||||
file:
|
||||
path: "{{ docker_dokuwiki_data_dir }}/{{ docker_dokuwiki_service_id }}/"
|
||||
state: directory
|
||||
register: _datadir
|
||||
|
||||
- name: prepare docker-compose.yml and files
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: /opt/{{ docker_dokuwiki_service_id }}/
|
||||
with_items:
|
||||
- docker-compose.yml
|
||||
notify: docker-compose-up
|
26
templates/docker-compose.yml
Normal file
26
templates/docker-compose.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
dokuwiki:
|
||||
image: {{ docker_dokuwiki_image_version }}
|
||||
restart: always
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- {{ docker_dokuwiki_data_dir }}/{{ docker_dokuwiki_service_id }}/config:/config
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.docker.network: "traefik"
|
||||
traefik.http.routers.{{ docker_dokuwiki_service_id }}.entrypoints: "web"
|
||||
traefik.http.routers.{{ docker_dokuwiki_service_id }}.rule: "Host(`{{ docker_dokuwiki_fqdn }}`)"
|
||||
traefik.http.services.{{ docker_dokuwiki_service_id }}.loadbalancer.server.port: "80"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
Loading…
Reference in a new issue