From 5a0abbfd7baad903701c0e5c783acb47b9b4323b Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 3 Dec 2022 16:34:49 +0100 Subject: [PATCH] Switched to Hometown fork --- Dockerfile | 10 +++---- Dockerfile.aarch64 | 8 +++--- docker-compose.yml | 66 ++++++++++++++++++++++++++++++++++++++++++++++ readme-vars.yml | 16 ++++++----- 4 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index d6867e1..fb16587 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15 ARG BUILD_DATE ARG VERSION -ARG MASTODON_VERSION +ARG HOMETOWN_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="TheSpad" +LABEL maintainer="Nikurasu" ENV RAILS_ENV="production" \ NODE_ENV="production" \ @@ -36,13 +36,13 @@ RUN \ ruby-dev && \ echo "**** install mastodon ****" && \ mkdir -p /app/www && \ - if [ -z ${MASTODON_VERSION+x} ]; then \ - MASTODON_VERSION=$(curl -sX GET "https://api.github.com/repos/mastodon/mastodon/releases/latest" \ + if [ -z ${HOMETOWN_VERSION+x} ]; then \ + HOMETOWN_VERSION=$(curl -sX GET "https://api.github.com/repos/hometown-fork/hometown/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ curl -s -o \ /tmp/mastodon.tar.gz -L \ - "https://github.com/mastodon/mastodon/archive/refs/tags/${MASTODON_VERSION}.tar.gz" && \ + "https://github.com/hometown-fork/hometown/archive/refs/tags/${HOMETOWN_VERSION}.tar.gz" && \ tar xf \ /tmp/mastodon.tar.gz -C \ /app/www/ --strip-components=1 && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index ca0d9b2..1f0d21d 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.15 ARG BUILD_DATE ARG VERSION -ARG MASTODON_VERSION +ARG HOMETOWN_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheSpad" @@ -38,13 +38,13 @@ RUN \ ruby-dev && \ echo "**** install mastodon ****" && \ mkdir -p /app/www && \ - if [ -z ${MASTODON_VERSION+x} ]; then \ - MASTODON_VERSION=$(curl -sX GET "https://api.github.com/repos/mastodon/mastodon/releases/latest" \ + if [ -z ${HOMETOWN_VERSION+x} ]; then \ + HOMETOWN_VERSION=$(curl -sX GET "https://api.github.com/repos/hometown-fork/hometown/releases/latest" \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ curl -s -o \ /tmp/mastodon.tar.gz -L \ - "https://github.com/mastodon/mastodon/archive/refs/tags/${MASTODON_VERSION}.tar.gz" && \ + "https://github.com/hometown-fork/hometown/archive/refs/tags/${HOMETOWN_VERSION}.tar.gz" && \ tar xf \ /tmp/mastodon.tar.gz -C \ /app/www/ --strip-components=1 && \ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3d8eb3f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,66 @@ +--- +version: "2.1" +services: + mastodon: + image: dev.cat-enby.club/nikurasu/docker-mastodon:latest-hometown + container_name: mastodon + environment: + - PUID=1000 + - PGID=1000 + - TZ=America/New_York + - LOCAL_DOMAIN=localhost + - REDIS_HOST=redis + - REDIS_PORT=6379 + - DB_HOST=db + - DB_USER=mastodon + - DB_NAME=mastodon + - DB_PASS=mastodon + - DB_PORT=5432 + - ES_ENABLED=false + - SECRET_KEY_BASE=sg + - OTP_SECRET=sg + - VAPID_PRIVATE_KEY=sg + - VAPID_PUBLIC_KEY=sg + - SMTP_SERVER=mail.your-server.de + - SMTP_PORT=25 + - SMTP_LOGIN=notify.cat-enby.club@nikurasu.gay + - SMTP_PASSWORD=6fs11V0LoPPav7gl + - SMTP_FROM_ADDRESS=notify.cat-enby.club@nikurasu.gay + - S3_ENABLED=false + - WEB_DOMAIN=localhost #optional + - ES_HOST=es #optional + - ES_PORT=9200 #optional + - ES_USER=elastic #optional + - ES_PASS=elastic #optional + - S3_BUCKET= #optional + - AWS_ACCESS_KEY_ID= #optional + - AWS_SECRET_ACCESS_KEY= #optional + - S3_ALIAS_HOST= #optional + - WEB_CONCURRENCY=2 #optional #puma processes + volumes: + - config:/config + ports: + - 80:80 + - 443:443 + restart: unless-stopped + depends_on: + - db + - redis + redis: + image: bitnami/redis + environment: + - ALLOW_EMPTY_PASSWORD=yes + volumes: + - redis-data:/bitnami/redis/data + db: + image: bitnami/postgresql:latest + environment: + - POSTGRESQL_USERNAME=mastodon + - POSTGRESQL_PASSWORD=mastodon + - POSTGRESQL_DATABASE=mastodon + volumes: + - db-data:/bitnami/postgresql +volumes: + config: + redis-data: + db-data: diff --git a/readme-vars.yml b/readme-vars.yml index fc2455d..8e506ca 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -1,13 +1,14 @@ --- # project information -project_name: mastodon -project_url: "https://github.com/mastodon/mastodon/" -project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mastodon-banner.png" +project_name: hometown +project_url: "https://github.com/hometown-fork/hometown/" +project_logo: "https://camo.githubusercontent.com/1affcf58842d9b19a69f38caf783156b0003fa80e3e532cd418df4e1215c70af/68747470733a2f2f6c6976652e737461746963666c69636b722e636f6d2f373030352f32363737373333393034325f623332636566346531665f622e6a7067" project_blurb: | - [{{ project_name|capitalize }}]({{ project_url }}) is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones.. + [{{ project_name|capitalize }}]({{ project_url }}) is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones with some extra features.. -project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" +# Uncommented because there is no lsio github repo +# project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" # supported architectures available_architectures: @@ -58,7 +59,8 @@ opt_param_env_vars: - { env_var: "AWS_ACCESS_KEY_ID", env_value: "", desc: "S3 bucket access key ID"} - { env_var: "AWS_SECRET_ACCESS_KEY", env_value: "", desc: "S3 bucket secret access key"} - { env_var: "S3_ALIAS_HOST", env_value: "", desc: "Alternate hostname for object fetching if you are front the S3 connections."} - + - { env_var: "WEB_CONCURRENCY", env_value: "2", desc: "Specific to Puma, this variable determines how many different processes Puma forks into. Defaults to `2`."} + - { env_var: "MAX_THREADS", env_value: "5", desc: "Specific to Puma, this variable determines how many threads each Puma process maintains. Defaults to `5`." param_usage_include_ports: true param_ports: - { external_port: "80", internal_port: "80", port_desc: "Port for web frontend" } @@ -89,4 +91,4 @@ app_setup_block: | # changelog changelogs: - - { date: "05.11.22:", desc: "Initial Release." } \ No newline at end of file + - { date: "05.11.22:", desc: "Initial Release." }