diff --git a/ansible/main.yml b/ansible/main.yml index 6a7035b..ac3f7c2 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -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: diff --git a/ansible/roles/macau/files/docker-compose.yml b/ansible/roles/macau/files/docker-compose.yml new file mode 100644 index 0000000..8aa2de5 --- /dev/null +++ b/ansible/roles/macau/files/docker-compose.yml @@ -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 diff --git a/ansible/roles/yourls/handlers/main.yml b/ansible/roles/macau/handlers/main.yml similarity index 51% rename from ansible/roles/yourls/handlers/main.yml rename to ansible/roles/macau/handlers/main.yml index 37cbdfb..0da79c6 100644 --- a/ansible/roles/yourls/handlers/main.yml +++ b/ansible/roles/macau/handlers/main.yml @@ -1,4 +1,4 @@ -- name: restart yourls +- name: restart macau shell: - chdir: /opt/yourls + chdir: /opt/macau cmd: "{{ docker_update_command }}" diff --git a/ansible/roles/yourls/tasks/main.yml b/ansible/roles/macau/tasks/main.yml similarity index 54% rename from ansible/roles/yourls/tasks/main.yml rename to ansible/roles/macau/tasks/main.yml index b48ed29..99d9122 100644 --- a/ansible/roles/yourls/tasks/main.yml +++ b/ansible/roles/macau/tasks/main.yml @@ -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 diff --git a/ansible/roles/macau/vars/vault.yml b/ansible/roles/macau/vars/vault.yml new file mode 100644 index 0000000..c8fd7a6 --- /dev/null +++ b/ansible/roles/macau/vars/vault.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +39336366303934636462306533326665396364393638316261356262343835356533653162313265 +6561623261646237386361363939623132653739656435610a656631363761633565383538636564 +35383433373038616530353335383434343161303331623265333939363162636634326134623234 +3638303138343939620a656138323638303665396662363436323631616661373566633832646335 +39343761653536343466393863613764313930663362303934353962633961616231653830343434 +64356465346138393634303865336639336632616330636333363063636464653661623963373965 +35613234373935363632663932333563653233623937353062316361326166643061666165663630 +36363839636635363632643966656632353638376465326332613435343735316466356439313262 +3166 diff --git a/ansible/roles/yourls/files/docker-compose.yml b/ansible/roles/yourls/files/docker-compose.yml deleted file mode 100644 index c44a868..0000000 --- a/ansible/roles/yourls/files/docker-compose.yml +++ /dev/null @@ -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 diff --git a/ansible/roles/yourls/files/index.html b/ansible/roles/yourls/files/index.html deleted file mode 100644 index 7f1407d..0000000 --- a/ansible/roles/yourls/files/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - -

Redirecting to website...

- - diff --git a/ansible/roles/yourls/vars/main.yml b/ansible/roles/yourls/vars/main.yml deleted file mode 100644 index 38095d4..0000000 --- a/ansible/roles/yourls/vars/main.yml +++ /dev/null @@ -1,11 +0,0 @@ -yourls_password: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 33643039353165363833306237306638636438623138343263666562356638333539376166363366 - 3861353462663436303638636562313236303238346235390a333438303537313966656337306138 - 36636530613837333631323135356334343639653761656132333531616230326332663366663865 - 3730363965303264620a663566353232363364613264636534343462323239633938343033366133 - 38313162626432393732383635623364343934303234323935353130373566343436323437636334 - 61383663653636373931326437636262306639616335613865366630313537613333393337353639 - 34613464323964633265363534323435353834333539323763623537373064303439353566373266 - 31636336663734326530623434633334663962663634653861383465343861316463386136373936 - 62393662343637313239396462643938393132366536666638623266376566616639 diff --git a/terraform/0rng.one.tf b/terraform/0rng.one.tf index fc852d4..93ca722 100644 --- a/terraform/0rng.one.tf +++ b/terraform/0rng.one.tf @@ -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}." ] }