mirror of
https://github.com/RealOrangeOne/infrastructure.git
synced 2026-01-22 18:07:05 +00:00
Replace YOURLS with macau
This commit is contained in:
parent
cb9cbd0065
commit
c6a749803d
9 changed files with 49 additions and 71 deletions
|
|
@ -66,7 +66,6 @@
|
|||
- hosts: pve-docker
|
||||
roles:
|
||||
- pve_docker
|
||||
- yourls
|
||||
- privatebin
|
||||
- vaultwarden
|
||||
- tandoor
|
||||
|
|
@ -111,6 +110,7 @@
|
|||
- website
|
||||
- slides
|
||||
- comentario
|
||||
- macau
|
||||
|
||||
- hosts: jellyfin
|
||||
roles:
|
||||
|
|
|
|||
29
ansible/roles/macau/files/docker-compose.yml
Normal file
29
ansible/roles/macau/files/docker-compose.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
services:
|
||||
macau:
|
||||
image: ghcr.io/realorangeone/macau:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=Europe/London
|
||||
- SECRET_KEY="{{ vault_secret_key }}"
|
||||
- DATABASE_URL=postgres://macau:macau@db/macau
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
depends_on:
|
||||
- db
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.macau.rule=Host(`0rng.one`)
|
||||
|
||||
db:
|
||||
image: pgautoupgrade/pgautoupgrade:17-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=macau
|
||||
- POSTGRES_USER=macau
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
- name: restart yourls
|
||||
- name: restart macau
|
||||
shell:
|
||||
chdir: /opt/yourls
|
||||
chdir: /opt/macau
|
||||
cmd: "{{ docker_update_command }}"
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
- name: Include vault
|
||||
include_vars: vault.yml
|
||||
|
||||
- name: Create install directory
|
||||
file:
|
||||
path: /opt/yourls
|
||||
path: /opt/macau
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
|
|
@ -8,16 +11,8 @@
|
|||
- name: Install compose file
|
||||
template:
|
||||
src: files/docker-compose.yml
|
||||
dest: /opt/yourls/docker-compose.yml
|
||||
dest: /opt/macau/docker-compose.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart yourls
|
||||
|
||||
- name: Install redirect file
|
||||
template:
|
||||
src: files/index.html
|
||||
dest: /opt/yourls/index.html
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart yourls
|
||||
notify: restart macau
|
||||
10
ansible/roles/macau/vars/vault.yml
generated
Normal file
10
ansible/roles/macau/vars/vault.yml
generated
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
39336366303934636462306533326665396364393638316261356262343835356533653162313265
|
||||
6561623261646237386361363939623132653739656435610a656631363761633565383538636564
|
||||
35383433373038616530353335383434343161303331623265333939363162636634326134623234
|
||||
3638303138343939620a656138323638303665396662363436323631616661373566633832646335
|
||||
39343761653536343466393863613764313930663362303934353962633961616231653830343434
|
||||
64356465346138393634303865336639336632616330636333363063636464653661623963373965
|
||||
35613234373935363632663932333563653233623937353062316361326166643061666165663630
|
||||
36363839636635363632643966656632353638376465326332613435343735316466356439313262
|
||||
3166
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
services:
|
||||
yourls:
|
||||
image: yourls:apache
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mariadb
|
||||
environment:
|
||||
- YOURLS_DB_PASS=yourls
|
||||
- YOURLS_DB_USER=yourls
|
||||
- YOURLS_DB_HOST=mariadb
|
||||
- YOURLS_USER=jake
|
||||
- YOURLS_PASS={{ yourls_password }}
|
||||
- YOURLS_SITE=https://0rng.one
|
||||
volumes:
|
||||
- ./index.html:/var/www/html/index.html:ro
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.yourls.rule=Host(`0rng.one`)
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.11
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
- MYSQL_DATABASE=yourls
|
||||
- MYSQL_USER=yourls
|
||||
- MYSQL_PASSWORD=yourls
|
||||
volumes:
|
||||
- /mnt/speed/dbs/mariadb/yourls:/var/lib/mysql
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; url=//theorangeone.net" />
|
||||
<meta name="robots" content="noindex">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Redirecting to website...</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
yourls_password: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
33643039353165363833306237306638636438623138343263666562356638333539376166363366
|
||||
3861353462663436303638636562313236303238346235390a333438303537313966656337306138
|
||||
36636530613837333631323135356334343639653761656132333531616230326332663366663865
|
||||
3730363965303264620a663566353232363364613264636534343462323239633938343033366133
|
||||
38313162626432393732383635623364343934303234323935353130373566343436323437636334
|
||||
61383663653636373931326437636262306639616335613865366630313537613333393337353639
|
||||
34613464323964633265363534323435353834333539323763623537373064303439353566373266
|
||||
31636336663734326530623434633334663962663634653861383465343861316463386136373936
|
||||
62393662343637313239396462643938393132366536666638623266376566616639
|
||||
|
|
@ -8,7 +8,7 @@ resource "gandi_livedns_record" "orngone_apex" {
|
|||
type = "ALIAS" # Gandi doesn't support CNAME-flattening
|
||||
ttl = 3600
|
||||
values = [
|
||||
"${gandi_livedns_record.sys_domain_pve.name}.${gandi_livedns_record.sys_domain_pve.zone}."
|
||||
"${gandi_livedns_record.sys_domain_walker.name}.${gandi_livedns_record.sys_domain_walker.zone}."
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue