Have yourls redirect root to admin page
I keep forgetting this is a thing and thinking it's broken
This commit is contained in:
parent
94da91db8e
commit
5027e77534
3 changed files with 20 additions and 2 deletions
|
@ -13,13 +13,14 @@ services:
|
||||||
- YOURLS_USER=jake
|
- YOURLS_USER=jake
|
||||||
- YOURLS_PASS={{ yourls.user_password }}
|
- YOURLS_PASS={{ yourls.user_password }}
|
||||||
- YOURLS_SITE=https://go.theorangeone.net
|
- YOURLS_SITE=https://go.theorangeone.net
|
||||||
|
volumes:
|
||||||
|
- ./index.html:/var/www/html/index.html
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.yourls.rule=Host(`go.theorangeone.net`)"
|
- "traefik.http.routers.yourls.rule=Host(`go.theorangeone.net`)"
|
||||||
- "traefik.http.routers.yourls.tls=true"
|
- "traefik.http.routers.yourls.tls=true"
|
||||||
- "traefik.http.routers.yourls.tls.certresolver=le"
|
- "traefik.http.routers.yourls.tls.certresolver=le"
|
||||||
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: linuxserver/mariadb:110.4.11mariabionic-ls47
|
image: linuxserver/mariadb:110.4.11mariabionic-ls47
|
||||||
environment:
|
environment:
|
||||||
|
|
8
ansible/roles/docker/files/yourls/index.html
Normal file
8
ansible/roles/docker/files/yourls/index.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; url=/admin/" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Redirecting to admin...</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -21,6 +21,15 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
|
|
||||||
|
- name: Install yourls index
|
||||||
|
template:
|
||||||
|
src: files/yourls/index.html
|
||||||
|
dest: "/opt/yourls/index.html"
|
||||||
|
mode: "{{ docker_compose_file_mask }}"
|
||||||
|
register: config_file
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
- name: Cycle yourls container
|
- name: Cycle yourls container
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /opt/yourls
|
project_src: /opt/yourls
|
||||||
|
@ -28,7 +37,7 @@
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
remove_volumes: true
|
remove_volumes: true
|
||||||
state: "{{ item }}"
|
state: "{{ item }}"
|
||||||
when: compose_file.changed
|
when: compose_file.changed or config_file.changed
|
||||||
loop:
|
loop:
|
||||||
- absent
|
- absent
|
||||||
- present
|
- present
|
||||||
|
|
Loading…
Reference in a new issue