This commit is contained in:
Kris Lamoureux 2021-10-15 14:34:38 -04:00
parent ed9100bc8f
commit db8bb672d3
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# base
allow_reboot: false
manage_network: false
# docker
docker_users:
- vagrant
# traefik
traefik_version: latest
traefik_dashboard: true
traefik_domain: traefik.vm.krislamo.org
traefik_auth: admin:$apr1$T1l.BCFz$Jyg8msXYEAUi3LLH39I9d1 # admin:admin
#traefik_acme_email: realemail@example.com # Let's Encrypt settings
#traefik_production: true
# mediawiki

10
dev/mediawiki.yml Normal file
View File

@ -0,0 +1,10 @@
- name: Install MediaWiki Server
hosts: all
become: true
vars_files:
- host_vars/mediawiki.yml
roles:
- base
- docker
- traefik
- mediawiki

1
roles/.gitignore vendored
View File

@ -7,6 +7,7 @@
!gitea*/
!jenkins*/
!libvirt*/
!mediawiki*/
!minecraft*/
!nextcloud*/
!nginx*/

View File

@ -0,0 +1 @@
mediawiki_name: mediawiki

View File

@ -0,0 +1,51 @@
- name: Create MediaWiki Network
docker_network:
name: "{{ mediawiki_name }}"
- name: Start MediaWiki's database container
docker_container:
name: "{{ mediawiki_dbname }}"
image: mariadb:{{ mediawiki_dbversion }}
state: started
restart_policy: always
volumes: "{{ mediawiki_dbroot }}:/var/lib/mysql"
networks_cli_compatible: true
networks:
- name: "{{ mediawiki_name }}"
env:
MYSQL_RANDOM_ROOT_PASSWORD: "true"
MYSQL_DATABASE: "{{ mediawiki_dbname }}"
MYSQL_USER: "{{ mediawiki_dbuser }}"
MYSQL_PASSWORD: "{{ mediawiki_dbpass }}"
- name: Start mediawiki container
docker_container:
name: "{{ mediawiki_name }}"
image: mediawiki/mediawiki:{{ mediawiki_version }}
state: started
restart_policy: always
networks_cli_compatible: true
ports: "{{ mediawiki_ports }}"
networks:
- name: "{{ mediawiki_name }}"
- name: traefik
# volumes:
# env:
# USER_UID: "1000"
# USER_GID: "1000"
# DB_TYPE: mysql
# DB_HOST: "{{ gitea_dbname }}"
# DB_NAME: "{{ gitea_dbname }}"
# DB_USER: "{{ gitea_dbuser }}"
# DB_PASSWD: "{{ gitea_dbpass }}"
# ROOT_URL: "https://{{ gitea_domain }}/"
# SSH_DOMAIN: "{{ gitea_domain }}"
# DOMAIN: "{{ gitea_domain }}"
# labels:
# traefik.http.routers.gitea.rule: "Host(`{{ gitea_domain }}`)"
# traefik.http.routers.gitea.entrypoints: websecure
# traefik.http.routers.gitea.tls.certresolver: letsencrypt
# traefik.http.routers.gitea.middlewares: "securehttps@file"
# traefik.http.services.gitea.loadbalancer.server.port: "3000"
# traefik.docker.network: traefik
# traefik.enable: "true"