From aaeba8baefc864435673a962620248a0c1087e1f Mon Sep 17 00:00:00 2001 From: Gab Date: Sat, 6 Apr 2024 01:39:41 -0400 Subject: [PATCH] chore: remove unused services and do clean up --- bin/down | 2 - bin/stop | 2 - bin/up | 2 - services/freshrss/.env.sample | 3 - services/freshrss/docker-compose.yml | 36 ------- services/mobilizon/.env.sample | 100 ------------------ services/mobilizon/docker-compose.yml | 76 ------------- services/mobilizon/postgres/.keep | 0 .../secrets/postgres-password.txt.sample | 1 - services/mobilizon/server/.keep | 0 .../.env.sample | 6 +- 11 files changed, 3 insertions(+), 225 deletions(-) delete mode 100644 services/freshrss/.env.sample delete mode 100644 services/freshrss/docker-compose.yml delete mode 100644 services/mobilizon/.env.sample delete mode 100644 services/mobilizon/docker-compose.yml delete mode 100644 services/mobilizon/postgres/.keep delete mode 100644 services/mobilizon/postgres/secrets/postgres-password.txt.sample delete mode 100644 services/mobilizon/server/.keep diff --git a/bin/down b/bin/down index bd2f139..96e70ec 100755 --- a/bin/down +++ b/bin/down @@ -1,8 +1,6 @@ #!/usr/bin/env bash docker compose --file services/personal-mastodon-instance/docker-compose.yml down -docker compose --file services/freshrss/docker-compose.yml down -docker compose --file services/mobilizon/docker-compose.yml down docker compose --file services/professional-mastodon-instance/docker-compose.yml down docker compose --file services/self-hosting-demo/docker-compose.yml down docker compose --file services/core/docker-compose.yml down diff --git a/bin/stop b/bin/stop index adb99f6..b216067 100755 --- a/bin/stop +++ b/bin/stop @@ -1,8 +1,6 @@ #!/usr/bin/env bash docker compose --file services/personal-mastodon-instance/docker-compose.yml stop -docker compose --file services/freshrss/docker-compose.yml stop -docker compose --file services/mobilizon/docker-compose.yml stop docker compose --file services/professional-mastodon-instance/docker-compose.yml stop docker compose --file services/self-hosting-demo/docker-compose.yml stop docker compose --file services/core/docker-compose.yml stop diff --git a/bin/up b/bin/up index 078eb0d..46a80d2 100755 --- a/bin/up +++ b/bin/up @@ -1,8 +1,6 @@ #!/usr/bin/env bash docker compose --file services/core/docker-compose.yml up -d --remove-orphans -docker compose --file services/freshrss/docker-compose.yml up -d --remove-orphans -docker compose --file services/mobilizon/docker-compose.yml up -d --remove-orphans docker compose --file services/personal-mastodon-instance/docker-compose.yml up -d --remove-orphans docker compose --file services/professional-mastodon-instance/docker-compose.yml up -d --remove-orphans docker compose --file services/self-hosting-demo/docker-compose.yml up -d --remove-orphans diff --git a/services/freshrss/.env.sample b/services/freshrss/.env.sample deleted file mode 100644 index 41297e4..0000000 --- a/services/freshrss/.env.sample +++ /dev/null @@ -1,3 +0,0 @@ -# Address at which the FreshRSS instance will be reachable: -BASE_URL=https://freshrss.example.net -DOMAIN=freshrss.example.net \ No newline at end of file diff --git a/services/freshrss/docker-compose.yml b/services/freshrss/docker-compose.yml deleted file mode 100644 index 76d02a5..0000000 --- a/services/freshrss/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "3.8" - -services: - freshrss: - image: freshrss/freshrss:1.22.1 - restart: unless-stopped - env_file: .env - logging: - options: - max-size: 10m - volumes: - - data:/var/www/FreshRSS/data - - extensions:/var/www/FreshRSS/extensions - environment: - TZ: America/Toronto - CRON_MIN: '3,33' - labels: - - traefik.enable=true - - traefik.http.middlewares.freshrssM1.compress=true - - traefik.http.middlewares.freshrssM2.headers.browserXssFilter=true - - traefik.http.middlewares.freshrssM2.headers.forceSTSHeader=true - - traefik.http.middlewares.freshrssM2.headers.frameDeny=true - - traefik.http.middlewares.freshrssM2.headers.referrerPolicy=no-referrer-when-downgrade - - traefik.http.middlewares.freshrssM2.headers.stsSeconds=3153600 - - traefik.http.routers.freshrss.entrypoints=websecure - - traefik.http.routers.freshrss.tls.certresolver=letsencrypt - - traefik.http.routers.freshrss.middlewares=freshrssM1,freshrssM2 - - traefik.http.routers.freshrss.rule=Host(`${DOMAIN}`) - -volumes: - data: - extensions: - -networks: - default: - name: intranet diff --git a/services/mobilizon/.env.sample b/services/mobilizon/.env.sample deleted file mode 100644 index 752e82a..0000000 --- a/services/mobilizon/.env.sample +++ /dev/null @@ -1,100 +0,0 @@ -###################################################### -# Instance configuration # -###################################################### - -# The name for your instance -MOBILIZON_INSTANCE_NAME=My Mobilizon Instance - -# Your domain -MOBILIZON_INSTANCE_HOST=example.com - -# The IP to listen on (defaults to 0.0.0.0) -# MOBILIZON_INSTANCE_LISTEN_IP - -# The port to listen on (defaults to 4000). Point your reverse proxy on this port. -MOBILIZON_INSTANCE_PORT=4000 - -# Whether registrations are opened or closed. Can be changed in the admin settings UI as well. -# Make sure to moderate actively your instance if registrations are opened. -MOBILIZON_INSTANCE_REGISTRATIONS_OPEN=false - -# From which email will the emails be sent -MOBILIZON_INSTANCE_EMAIL=noreply@example.com - -# To which email with the replies be sent -MOBILIZON_REPLY_EMAIL=contact@example.com - -# The loglevel setting. -# You can find accepted values here: https://hexdocs.pm/logger/Logger.html#module-levels -# Defaults to error -MOBILIZON_LOGLEVEL=error - -###################################################### -# Database settings # -###################################################### - -# The Mobilizon Database username -MOBILIZON_DATABASE_USERNAME=mobilizon - -# The Mobilizon Database password -MOBILIZON_DATABASE_PASSWORD= - -# The Mobilizon Database name -MOBILIZON_DATABASE_DBNAME=mobilizon - -# The Mobilizon database host -MOBILIZON_DATABASE_HOST=mobilizon-postgres - -# The Mobilizon database port -# MOBILIZON_DATABASE_PORT= - -# Whether to use SSL to connect to the Mobilizon database -# MOBILIZON_DATABASE_SSL= - -###################################################### -# Secrets # -###################################################### - -# A secret key used as a base to generate secrets for encrypting and signing data. -# Make sure it's long enough (~64 characters should be fine) -# You can run `openssl rand -base64 48` to generate such a secret -MOBILIZON_INSTANCE_SECRET_KEY_BASE= - -# A secret key used as a base to generate JWT tokens -# Make sure it's long enough (~64 characters should be fine) -# You can run `openssl rand -base64 48` to generate such a secret -MOBILIZON_INSTANCE_SECRET_KEY= - - -###################################################### -# Email settings # -###################################################### - -# The SMTP server -# Defaults to localhost -MOBILIZON_SMTP_SERVER=localhost - -# The SMTP port -# Usual values: 25, 465, 587 -# If using a local mail server, make sure the appropriate port is exposed in the docker-compose configuration as well -# Defaults to 25 -MOBILIZON_SMTP_PORT=25 - -# The SMTP username -# Defaults to nil -MOBILIZON_SMTP_USERNAME=noreply@example.com - -# The SMTP password -# Defaults to nil -MOBILIZON_SMTP_PASSWORD=password - -# Whether to use SSL for SMTP. -# Boolean -# Defaults to false -MOBILIZON_SMTP_SSL=false - -# Whether to use TLS for SMTP. -# Allowed values: always (TLS), never (Clear) and if_available (STARTTLS) -# Make sure to match the port value as well -# Defaults to "if_available" -MOBILIZON_SMTP_TLS=if_available diff --git a/services/mobilizon/docker-compose.yml b/services/mobilizon/docker-compose.yml deleted file mode 100644 index 7a18029..0000000 --- a/services/mobilizon/docker-compose.yml +++ /dev/null @@ -1,76 +0,0 @@ -version: "3" - -services: - mobilizon-server: - image: framasoft/mobilizon:4.0.2 - container_name: mobilizon-server - restart: always - env_file: .env - volumes: - # fix permission: - # sudo chown 65534:65534 ./server/uploads/ - - ./server/uploads:/var/lib/mobilizon/uploads - expose: - - "4000" - depends_on: - - mobilizon-postgres - labels: - - "traefik.enable=true" - - "traefik.http.services.mobilizon-server.loadbalancer.server.port=4000" - - "traefik.http.routers.mobilizon-server.rule=Host(`${MOBILIZON_INSTANCE_HOST}`)" - - "traefik.http.routers.mobilizon-server.entrypoints=websecure" - - "traefik.http.routers.mobilizon-server.tls.certresolver=letsencrypt" - environment: - - MOBILIZON_INSTANCE_NAME - - MOBILIZON_INSTANCE_HOST - - MOBILIZON_INSTANCE_LISTEN_IP - - MOBILIZON_INSTANCE_PORT - - MOBILIZON_INSTANCE_EMAIL - - MOBILIZON_REPLY_EMAIL - - MOBILIZON_INSTANCE_REGISTRATIONS_OPEN - - MOBILIZON_DATABASE_USERNAME - - MOBILIZON_DATABASE_PASSWORD - - MOBILIZON_DATABASE_DBNAME - - MOBILIZON_DATABASE_HOST - - MOBILIZON_DATABASE_PORT - - MOBILIZON_DATABASE_SSL - - MOBILIZON_INSTANCE_SECRET_KEY_BASE - - MOBILIZON_INSTANCE_SECRET_KEY - - MOBILIZON_LOGLEVEL - - MOBILIZON_SMTP_SERVER - - MOBILIZON_SMTP_PORT - - MOBILIZON_SMTP_SSL - - MOBILIZON_SMTP_TLS - - MOBILIZON_SMTP_USERNAME - - MOBILIZON_SMTP_PASSWORD - - MOBILIZON_UPLOADS - - MOBILIZON_UPLOADS_EXPORTS - - MOBILIZON_TIMEZONES_DIR - - MOBILIZON_TZDATA_DIR - - mobilizon-postgres: - # How to upgrade to a major version - # https://github.com/tianon/docker-postgres-upgrade - image: postgis/postgis:16-3.4-alpine - container_name: mobilizon-postgres - restart: always - healthcheck: - test: ["CMD", "pg_isready", "-U", "postgres"] - volumes: - - ./postgres/16/data:/var/lib/postgresql/data - secrets: - - postgres-password - environment: - - TZ=UTC - - PGTZ=UTC - - POSTGRES_DB=postgres - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD_FILE=/run/secrets/postgres-password - -networks: - default: - name: intranet - -secrets: - postgres-password: - file: ./postgres/secrets/postgres-password.txt diff --git a/services/mobilizon/postgres/.keep b/services/mobilizon/postgres/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/services/mobilizon/postgres/secrets/postgres-password.txt.sample b/services/mobilizon/postgres/secrets/postgres-password.txt.sample deleted file mode 100644 index 2ca5167..0000000 --- a/services/mobilizon/postgres/secrets/postgres-password.txt.sample +++ /dev/null @@ -1 +0,0 @@ -change_me! \ No newline at end of file diff --git a/services/mobilizon/server/.keep b/services/mobilizon/server/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/services/professional-mastodon-instance/.env.sample b/services/professional-mastodon-instance/.env.sample index f174fae..11f654b 100644 --- a/services/professional-mastodon-instance/.env.sample +++ b/services/professional-mastodon-instance/.env.sample @@ -26,9 +26,9 @@ REDIS_PORT=6379 # PostgreSQL # ---------- -DB_HOST=/var/run/postgresql -DB_USER=mastodon -DB_NAME=mastodon_production +DB_HOST=postgresql +DB_USER=professional_mastodon_instance +DB_NAME=professional_mastodon_instance DB_PASS= DB_PORT=5432