diff --git a/roles/docker/files/Caddyfile b/roles/docker/files/Caddyfile index 3dc1481..8540574 100644 --- a/roles/docker/files/Caddyfile +++ b/roles/docker/files/Caddyfile @@ -15,6 +15,6 @@ bookmarks.thesatelliteoflove.com { reverse_proxy hoarder-web-1:3000 } -ai.thesatelliteoflove.com { - reverse_proxy open-webui:8080 +social.thesatelliteoflove.com { + reverse_proxy gotosocial:8080 } \ No newline at end of file diff --git a/roles/docker/files/gitea-compose.yml b/roles/docker/files/gitea-compose.yml index fa80811..e427ec5 100644 --- a/roles/docker/files/gitea-compose.yml +++ b/roles/docker/files/gitea-compose.yml @@ -14,7 +14,7 @@ services: ports: - 222:22 extra_hosts: - - 'auth.thesatelliteoflove.com:172.20.0.6' + - 'auth.thesatelliteoflove.com:172.20.0.2' volumes: gitea: diff --git a/roles/docker/tasks/gitea.yml b/roles/docker/tasks/gitea.yml index 6af2f73..605aa10 100644 --- a/roles/docker/tasks/gitea.yml +++ b/roles/docker/tasks/gitea.yml @@ -1,4 +1,4 @@ -- name: make caddy directories +- name: make gitea directories ansible.builtin.file: path: "{{ item}}" state: directory diff --git a/roles/docker/tasks/gotosocial.yml b/roles/docker/tasks/gotosocial.yml new file mode 100644 index 0000000..6e0529a --- /dev/null +++ b/roles/docker/tasks/gotosocial.yml @@ -0,0 +1,19 @@ +- name: make gotosocial directories + ansible.builtin.file: + path: "{{ item}}" + state: directory + loop: + - /opt/stacks/gotosocial + +- name: Template out the compose file + ansible.builtin.template: + src: gotosocial-compose.yml.j2 + dest: /opt/stacks/gotosocial/compose.yml + owner: root + mode: 644 + +- name: deploy gotosocial stack + community.docker.docker_compose_v2: + project_src: /opt/stacks/gotosocial + files: + - compose.yml \ No newline at end of file diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 7824a9a..eef5e95 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -70,5 +70,6 @@ - name: Install authentik import_tasks: authentik.yml -#- name: Install openwebui -# import_tasks: openwebui.yml +- name: Install gotosocial + import_tasks: gotosocial.yml + diff --git a/roles/docker/templates/authentik-compose.yml.j2 b/roles/docker/templates/authentik-compose.yml.j2 index aa786b9..22ff1c6 100644 --- a/roles/docker/templates/authentik-compose.yml.j2 +++ b/roles/docker/templates/authentik-compose.yml.j2 @@ -18,7 +18,7 @@ services: POSTGRES_DB: ${PG_DB:-authentik} env_file: - .env - redis: + trout: image: docker.io/library/redis:alpine command: --save 60 1 --loglevel warning restart: unless-stopped @@ -29,13 +29,13 @@ services: retries: 5 timeout: 3s volumes: - - redis:/data + - trout:/data server: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2024.6.3} restart: unless-stopped command: server environment: - AUTHENTIK_REDIS__HOST: redis + AUTHENTIK_REDIS__HOST: trout AUTHENTIK_POSTGRESQL__HOST: postgresql AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} @@ -50,13 +50,13 @@ services: - "${COMPOSE_PORT_HTTPS:-9443}:9443" depends_on: - postgresql - - redis + - trout worker: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2024.6.3} restart: unless-stopped command: worker environment: - AUTHENTIK_REDIS__HOST: redis + AUTHENTIK_REDIS__HOST: trout AUTHENTIK_POSTGRESQL__HOST: postgresql AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} @@ -77,12 +77,12 @@ services: - .env depends_on: - postgresql - - redis + - trout volumes: database: driver: local - redis: + trout: driver: local networks: diff --git a/roles/docker/templates/gotosocial-compose.yml.j2 b/roles/docker/templates/gotosocial-compose.yml.j2 new file mode 100644 index 0000000..6ee9a7d --- /dev/null +++ b/roles/docker/templates/gotosocial-compose.yml.j2 @@ -0,0 +1,36 @@ +version: "3.3" + +services: + gotosocial: + image: superseriousbusiness/gotosocial:0.16.0 + container_name: gotosocial + user: 1000:1000 + extra_hosts: + - 'auth.thesatelliteoflove.com:172.20.0.2' + environment: + GTS_HOST: social.thesatelliteoflove.com + GTS_DB_TYPE: sqlite + GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db + GTS_LETSENCRYPT_ENABLED: "false" + GTS_LETSENCRYPT_EMAIL_ADDRESS: "" + GTS_TRUSTED_PROXIES: "172.20.0.2" + GTS_ACCOUNT_DOMAIN: thesatelliteoflove.com + GTS_OIDC_ENABLED: "true" + GTS_OIDC_IDP_NAME: "Authentik" + GTS_OIDC_ISSUER: https://auth.thesatelliteoflove.com/application/o/gotosocial/ + GTS_OIDC_CLIENT_ID: {{ gts_oidc_client_id }} + GTS_OIDC_CLIENT_SECRET: {{ gts_oidc_client_secret }} + GTS_OIDC_LINK_EXISTING: "true" + TZ: UTC + volumes: + - gotosocial:/gotosocial/storage + restart: "always" + +volumes: + gotosocial: + driver: local + +networks: + default: + external: true + name: lava \ No newline at end of file