Add shlink service (url-shortener)

This commit is contained in:
Tobias Reisinger 2024-01-24 23:34:35 +01:00
parent a4e54de54c
commit ea037209f6
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 48 additions and 6 deletions

View file

@ -45,6 +45,8 @@
tags: [ntfy, notifications, push]
- role: reitanlage_oranienburg
tags: [reitanlage-oranienburg, website]
- role: shlink
tags: [shlink, url-shortener]
- role: synapse
tags: [synapse, matrix, communication]
- role: tandoor

View file

@ -7,8 +7,10 @@ faas_svc:
extra_svcs:
- domain: link.serguzim.me
faas_function: url-mapper
- domain: msrg.cc
faas_function: webpage-msrg-cc
- domain: serguzim.me
faas_function: webpage-serguzim-me
www_domain: true
hsts: true
caddy_extra: |
header /.well-known/* Access-Control-Allow-Origin *
@ -20,10 +22,6 @@ faas_svc:
rewrite * /.well-known/webfinger/{user}.json
import faas webpage-msrg-cc
}
- domain: serguzim.me
faas_function: webpage-serguzim-me
www_domain: true
hsts: true
- domain: team-leon.eu
faas_function: webpage-team-leon-eu
www_domain: true

View file

@ -0,0 +1,12 @@
---
- name: Set common facts
ansible.builtin.import_tasks: tasks/set-default-facts.yml
- name: Deploy {{ svc.name }}
vars:
svc: "{{ shlink_svc }}"
env: "{{ shlink_env }}"
compose: "{{ shlink_compose }}"
block:
- name: Import tasks to deploy common service
ansible.builtin.import_tasks: tasks/deploy-common-service.yml

View file

@ -0,0 +1,30 @@
---
shlink_svc:
domain: msrg.cc
name: shlink
port: 8080
shlink_env:
DEFAULT_DOMAIN: "{{ shlink_svc.domain }}"
IS_HTTPS_ENABLED: true
TIMEZONE: "{{ timezone }}"
DEFAULT_SHORT_CODES_LENGTH: 8
MULTI_SEGMENT_SLUGS_ENABLED: false
SHORT_URL_TRAILING_SLASH: true
REDIRECT_APPEND_EXTRA_PATH: true
DEFAULT_BASE_URL_REDIRECT: "https://www.serguzim.me/"
DB_DRIVER: postgres
DB_HOST: "{{ postgres.host }}"
DB_PORT: "{{ postgres.port }}"
DB_NAME: shlink
DB_USER: "{{ vault_shlink.db.user }}"
DB_PASSWORD: "{{ vault_shlink.db.pass }}"
DISABLE_TRACKING: true
SKIP_INITIAL_GEOLITE_DOWNLOAD: true
shlink_compose:
watchtower: true
image: shlinkio/shlink