From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1689262143; bh=0DQ7P39mDArrG7ujymlK04T3N+XlKH6WL1IhHgLex68=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=j7WK2eDAb5plbyCasEWY+1WfByga3iMx4M+icK6k29PsSwX38DNVqjivpDdba3xIi yOz8TsGzXLmaQ+MWuhlzpPAj9i9d4JPu4jFkZNDtaJ/ApWDvB2xidmCXeoLGkEf8J3 8dVonO9Y4NpV48SWBCPSfPxBAW7lybT5fSPgvmtvOpiY/kijS6u/XYlU97EW/EWqDt vLZGAwBprUPeGX6v+JiR0CZ4Pib31CSkWTa1cn+6lCk1ytl1/BDQ9pOze/qs7N50oi MjuBw2Y82VWF8fYV+X02nhbxDdd8M8L13XdF2jvuDn65O9qhN+4abGaFRBZ8++qOf8 jq3Ouy7xTTUJA== Received: from server-haj002.. (server-haj002.gnuweeb.org [45.83.104.102]) by gnuweeb.org (Postfix) with ESMTPSA id B9D2B24AC6A; Thu, 13 Jul 2023 22:29:02 +0700 (WIB) From: Alviro Iskandar Setiawan To: Ammar Faizi , Michael William Jonathan Cc: Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH server-haj002 v1 4/6] mastodon: Move data directory inside the git project Date: Thu, 13 Jul 2023 17:28:48 +0200 Message-Id: <20230713152850.5565-5-alviro.iskandar@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230713152850.5565-1-alviro.iskandar@gnuweeb.org> References: <20230713152850.5565-1-alviro.iskandar@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Move data directory inside the git project to allow the docker-comose.yml file to use relative path. Then sync the docker-compose file with the prod file (add hostname entry and DNS related changes). Signed-off-by: Alviro Iskandar Setiawan --- .gitmodules | 3 +++ mastodon/.gitignore | 3 ++- mastodon/docker-compose.example.yml | 16 ++++++++++------ mastodon/docker-mastodon | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .gitmodules create mode 160000 mastodon/docker-mastodon diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..aeb163f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mastodon/docker-mastodon"] + path = mastodon/docker-mastodon + url = https://github.com/alviroiskandar/docker-mastodon.git diff --git a/mastodon/.gitignore b/mastodon/.gitignore index 2f0cdc6..a38d3b2 100644 --- a/mastodon/.gitignore +++ b/mastodon/.gitignore @@ -1 +1,2 @@ -/docker-compose.yml \ No newline at end of file +/docker-compose.yml +/data/mastodon/ diff --git a/mastodon/docker-compose.example.yml b/mastodon/docker-compose.example.yml index 769800f..b1fc36d 100644 --- a/mastodon/docker-compose.example.yml +++ b/mastodon/docker-compose.example.yml @@ -26,7 +26,7 @@ services: environment: - ALLOW_EMPTY_PASSWORD=yes volumes: - - /opt/mastodon/redis:/bitnami/redis/data + - ./data/mastodon/redis:/bitnami/redis/data postgres: networks: @@ -42,7 +42,7 @@ services: - POSTGRES_DB=mastodon - PGDATA=/var/lib/postgresql/data volumes: - - /opt/mastodon/postgres:/var/lib/postgresql/data + - ./data/mastodon/postgres:/var/lib/postgresql/data mastodon: networks: @@ -52,9 +52,11 @@ services: depends_on: - postgres - redis - image: lscr.io/linuxserver/mastodon:latest + image: mastodon-gw + build: ./docker-mastodon restart: unless-stopped container_name: mastodon + hostname: social.gnuweeb.org environment: - PUID=1000 - PGID=1000 @@ -90,9 +92,11 @@ services: - SIDEKIQ_ONLY=false #optional - SIDEKIQ_QUEUE= #optional - SIDEKIQ_DEFAULT=false #optional - - SIDEKIQ_THREADS=5 #optional - - DB_POOL=5 #optional + - SIDEKIQ_THREADS=32 #optional + - DB_POOL=32 #optional + - HCAPTCHA_SECRET_KEY= #optional + - HCAPTCHA_SITE_KEY= volumes: - - /opt/mastodon/mastodon/config:/config + - ./data/mastodon/mastodon/config:/config - ./resolv.conf:/etc/resolv.conf - ./hosts:/etc/hosts diff --git a/mastodon/docker-mastodon b/mastodon/docker-mastodon new file mode 160000 index 0000000..962c135 --- /dev/null +++ b/mastodon/docker-mastodon @@ -0,0 +1 @@ +Subproject commit 962c135c5f31d9051057c92594449369522c674f -- Alviro Iskandar Setiawan