From 486ac1f4901c004f8a1a290e86d45bb1078584ba Mon Sep 17 00:00:00 2001 From: TakeV Date: Fri, 2 Feb 2024 20:05:40 -0500 Subject: [PATCH 1/2] Add README.org --- README.org | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.org diff --git a/README.org b/README.org new file mode 100644 index 0000000..6888b26 --- /dev/null +++ b/README.org @@ -0,0 +1,45 @@ +#+#+title: Solarpunk Mastodon + +The solarpunk.moe mastodon configuration and customizations. + +* Build + +Building the project requires a couple of steps. + +** Copy files +To build, copy the content of this folder to a copy of the mastodon source code, then =docker compose build=. + +Assuming that your local mastodon checkout is located at =~/src/mastodon=, you can run the following from this project folder: + +#+begin_src sh + SOLARPUNK_REPO=$PWD + MASTODON_REPO=$HOME/src/mastodon + + cp -r $SOLARPUNK_REPO/* $MASTODON_REPO/ + cp -r $SOLARPUNK_REPO/.env.production $MASTODON_REPO/ +#+end_src + +Should you have your mastodon checkout in a different location, set =MASTODON_REPO= to that location. + +** Build docker images + +After copying the files, we can build the docker images with: + +#+begin_src sh + cd $MASTODON_REPO + docker compose build +#+end_src + +* WIP Running mastodon + +To run the instance, follow these steps: + +*Going to need vv to fill this part out.* + +** TODO Set up external networks + +** TODO Set up reverse proxy + +** TODO Set up cert-bot + +** TODO Run containers From 2c72f8444a4433cc6d676bb09685f7d2b4631185 Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Fri, 2 Feb 2024 21:11:38 -0500 Subject: [PATCH 2/2] Update docker-compose --- docker-compose.yml | 66 +++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ea9e6b4..50d2e20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: redis: restart: always - image: redis:6-alpine + image: redis:7-alpine networks: - internal_network healthcheck: @@ -25,30 +25,31 @@ services: volumes: - ./redis:/data - es: - restart: always - image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 - environment: - - "ES_JAVA_OPTS=-Xms512m -Xmx512m" - - "cluster.name=es-mastodon" - - "discovery.type=single-node" - - "bootstrap.memory_lock=true" - - "cluster.routing.allocation.disk.watermark.low=0.9" - - "cluster.routing.allocation.disk.watermark.high=0.94" - networks: - - internal_network - healthcheck: - test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"] - volumes: - - elasticsearch:/usr/share/elasticsearch/data - ulimits: - memlock: - soft: -1 - hard: -1 + #es: + # restart: always + # image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 + # environment: + # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + # - "cluster.name=es-mastodon" + # - "discovery.type=single-node" + # - "bootstrap.memory_lock=true" + # - "cluster.routing.allocation.disk.watermark.low=0.95" + # - "cluster.routing.allocation.disk.watermark.high=0.97" + # - "cluster.routing.allocation.disk.watermark.flood_stage=0.98" + # networks: + # - internal_network + # healthcheck: + # test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"] + # volumes: + # - elasticsearch:/usr/share/elasticsearch/data + # ulimits: + # memlock: + # soft: -1 + # hard: -1 web: build: . - image: git.solarpunk.moe/solarpunk/mastodon + image: git.solarpunk.moe/solarpunk/mastodon:v4.2.5 restart: always env_file: .env.production environment: @@ -78,10 +79,12 @@ services: # - es volumes: - ./public/system:/mastodon/public/system - + streaming: - build: . - image: git.solarpunk.moe/solarpunk/mastodon:latest + build: + dockerfile: ./streaming/Dockerfile + context: . + image: git.solarpunk.moe/solarpunk/mastodon-streaming:v4.2.5 restart: always env_file: .env.production command: node ./streaming @@ -105,10 +108,10 @@ services: depends_on: - db - redis - + sidekiq-mailers: build: . - image: git.solarpunk.moe/solarpunk/mastodon:latest + image: git.solarpunk.moe/solarpunk/mastodon:v4.2.5 restart: always env_file: .env.production command: bundle exec sidekiq -c 2 -q mailers -q scheduler @@ -126,7 +129,7 @@ services: sidekiq-ingress-pull-push-default: build: . - image: git.solarpunk.moe/solarpunk/mastodon:latest + image: git.solarpunk.moe/solarpunk/mastodon:v4.2.5 restart: always env_file: .env.production command: bundle exec sidekiq -c 5 -q ingress -q pull -q push -q default @@ -139,12 +142,13 @@ services: - external_network - internal_network - mail + - httpsproxy volumes: - ./public/system:/mastodon/public/system sidekiq-default-push-pull: build: . - image: git.solarpunk.moe/solarpunk/mastodon:latest + image: git.solarpunk.moe/solarpunk/mastodon:v4.2.5 restart: always env_file: .env.production command: bundle exec sidekiq -c 3 -q default -q ingress -q push -q pull @@ -157,12 +161,13 @@ services: - external_network - internal_network - mail + - httpsproxy volumes: - ./public/system:/mastodon/public/system sidekiq-pull-push-default: build: . - image: git.solarpunk.moe/solarpunk/mastodon:latest + image: git.solarpunk.moe/solarpunk/mastodon:v4.2.5 restart: always env_file: .env.production command: bundle exec sidekiq -c 8 -q pull -q push -q default -q ingress @@ -175,6 +180,7 @@ services: - external_network - internal_network - mail + - httpsproxy volumes: - ./public/system:/mastodon/public/system