Add traefik pages
Add it ready for the migration in future
This commit is contained in:
parent
e1ea938d59
commit
604202fdce
10 changed files with 103 additions and 0 deletions
11
ansible/group_vars/all/traefik.yml
Normal file
11
ansible/group_vars/all/traefik.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
traefik_pages_password: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
36613865643964363065396534373438383931323930333962653762633831383039363737386430
|
||||||
|
3832343537373366306162383136316365313836623236360a343936623764383264633166666139
|
||||||
|
37666165653938636164363765613964336663326666643537343131613133313336626266663138
|
||||||
|
6162326633306162650a363731663031613738333564393033333131373630383163666264663130
|
||||||
|
36323039363133366562626262386530616134623234623365663662643362386239643637346633
|
||||||
|
33383735303736336661633739623565356664386462653062313632353830323439393563386439
|
||||||
|
35313433666362383066303135396265393632376535396265323838376437653132393637376531
|
||||||
|
66643233353735353133626539346432366166303732343666333735633136313661333761653865
|
||||||
|
33623164306363623665613063656438303938306138336233393234663532323938
|
|
@ -1 +1,2 @@
|
||||||
app_data_dir: .
|
app_data_dir: .
|
||||||
|
with_traefik_pages: true
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
roles:
|
roles:
|
||||||
- plausible
|
- plausible
|
||||||
- duplicati
|
- duplicati
|
||||||
|
- pages
|
||||||
|
|
||||||
- hosts: pve-docker
|
- hosts: pve-docker
|
||||||
roles:
|
roles:
|
||||||
|
|
29
ansible/roles/pages/files/docker-compose.yml
Normal file
29
ansible/roles/pages/files/docker-compose.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
version: "2.3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
minio:
|
||||||
|
image: minio/minio:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
user: "{{ pages_user_id }}"
|
||||||
|
volumes:
|
||||||
|
- ./sites:/data
|
||||||
|
command: server /data --quiet
|
||||||
|
environment:
|
||||||
|
- MINIO_ACCESS_KEY={{ minio_access_key }}
|
||||||
|
- MINIO_SECRET_KEY={{ minio_secret_key }}
|
||||||
|
|
||||||
|
traefik-pages:
|
||||||
|
image: theorangeone/traefik-pages:latest
|
||||||
|
volumes:
|
||||||
|
- ./sites:/sites:ro
|
||||||
|
restart: unless-stopped
|
||||||
|
user: "{{ pages_user_id }}"
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:5000:5000
|
||||||
|
environment:
|
||||||
|
- SITES_ROOT=/sites
|
||||||
|
- TRAEFIK_SERVICE=traefik-pages-pages@docker
|
||||||
|
- AUTH_PASSWORD={{ traefik_pages_password }}
|
||||||
|
- TRAEFIK_CERT_RESOLVER=le
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
4
ansible/roles/pages/handlers/main.yml
Normal file
4
ansible/roles/pages/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: restart pages
|
||||||
|
shell:
|
||||||
|
chdir: /opt/pages
|
||||||
|
cmd: "{{ docker_update_command }}"
|
25
ansible/roles/pages/tasks/main.yml
Normal file
25
ansible/roles/pages/tasks/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
- name: Create install directory
|
||||||
|
file:
|
||||||
|
path: /opt/pages/sites
|
||||||
|
state: directory
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
mode: "{{ docker_compose_directory_mask }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Create sites directory
|
||||||
|
file:
|
||||||
|
path: /opt/pages/sites
|
||||||
|
state: directory
|
||||||
|
owner: "{{ pages_user_id }}"
|
||||||
|
mode: "{{ docker_compose_directory_mask }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Install compose file
|
||||||
|
template:
|
||||||
|
src: files/docker-compose.yml
|
||||||
|
dest: /opt/pages/docker-compose.yml
|
||||||
|
mode: "{{ docker_compose_file_mask }}"
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
validate: /usr/bin/docker-compose -f %s config
|
||||||
|
notify: restart pages
|
||||||
|
become: true
|
24
ansible/roles/pages/vars/main.yml
Normal file
24
ansible/roles/pages/vars/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
minio_access_key: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
36353266366231326332636363333537356564336266613763333934333062356134393561336166
|
||||||
|
3864643564356533383561326336656239366163363861340a393564386234373632356530636165
|
||||||
|
64326637643237633366333931653265663534363831383063376665376163653861303464613035
|
||||||
|
3436613338323537640a616266623930633862306638633166373634393739336635323031393361
|
||||||
|
37383136326330653239356431363935623530653531356135633463643638363036643634653336
|
||||||
|
31316266373539653063666438376364663734323837356330393436303836633239353037343738
|
||||||
|
31303933376162623838386233366363643532323366306161663838313530366535636532666530
|
||||||
|
65666633306534616165393930303738313737353635306635373430613261633265616536386336
|
||||||
|
31393238643230336130643938373432396238613931663939383464343533303865
|
||||||
|
minio_secret_key: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
34633434353863636337666139366530656164613565356465336538386162393539666638383831
|
||||||
|
3666623139366138393465646536396537323739383061390a373465626233396439336235323964
|
||||||
|
61326266666333393265636666326336343334646538306466643064366639353431393336616436
|
||||||
|
6438313535613638310a623466313233643066656163646334336536333136636136386561623536
|
||||||
|
31653262346331343737346337323738313138626236363962616661383634613435396334326633
|
||||||
|
34343464386239333938383365343431396236653865326536353238653431643539653731636130
|
||||||
|
32353265353237346565373333646161356664663862393364313463333533643331396535393937
|
||||||
|
61613737396262316165326633363833343133363838633836376631666432653237393739396131
|
||||||
|
36643531353739373063393230356137623833346439393035646463636336356334
|
||||||
|
|
||||||
|
pages_user_id: 33
|
|
@ -5,3 +5,5 @@ traefik_proxy_protocol_trusted_ips: "{{ wireguard.cidr }}"
|
||||||
|
|
||||||
traefik_provider_jellyfin: false
|
traefik_provider_jellyfin: false
|
||||||
traefik_provider_homeassistant: false
|
traefik_provider_homeassistant: false
|
||||||
|
|
||||||
|
with_traefik_pages: false
|
||||||
|
|
|
@ -26,6 +26,11 @@ providers:
|
||||||
exposedByDefault: false
|
exposedByDefault: false
|
||||||
file:
|
file:
|
||||||
directory: /etc/traefik/conf
|
directory: /etc/traefik/conf
|
||||||
|
{% if with_traefik_pages %}
|
||||||
|
http:
|
||||||
|
endpoint:
|
||||||
|
- "http://{{ traefik_pages_password }}@127.0.0.1:5000/.traefik-pages/provider"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
api:
|
api:
|
||||||
dashboard: true
|
dashboard: true
|
||||||
|
|
|
@ -3,6 +3,7 @@ extends: default
|
||||||
ignore: |
|
ignore: |
|
||||||
ansible/galaxy_roles
|
ansible/galaxy_roles
|
||||||
ansible/group_vars/all/hosts.yml
|
ansible/group_vars/all/hosts.yml
|
||||||
|
ansible/roles/traefik/files/traefik.yml
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
document-start: disable
|
document-start: disable
|
||||||
|
|
Loading…
Reference in a new issue