Compare commits

..

41 Commits

Author SHA1 Message Date
00d71c3fb6 Upgrade to 4.5.11+1.2.1
All checks were successful
continuous-integration/drone/tag Build is passing
Notable change
is that the streaming and main images
have different entrypoints in the Dockerfiles.
I broke up our entrypoint.sh to respect that.

Unclear if this affected 1.2.0,
but in my tests the streaming container
deployed without issue in 1.2.0.
2026-06-17 14:29:54 +00:00
139a1e468f Upgrade to upstream v4.5.6+1.2.0
All checks were successful
continuous-integration/drone/tag Build is passing
Applies the changes defined in https://github.com/hometown-fork/hometown/releases/tag/v4.5.6%2Bhometown-1.2.0
 (with one exception: I ignored the optional fasp Sidekiq queue)

There was a long gap in upstream releases,
 and the hometown fork skipped over 4.3.x and 4.4.x
 so there are a lot of changes here.

NB: this isn't the current up-to-date version of hometown,
 but the later releases suggest doing the 1.2.0 upgrade
 before moving on. So I'm giving Coop-Cloud operators that option
2026-06-17 13:25:18 +00:00
82db6c381b chore: publish 2.0.2+v4.2.17-hometown-1.1.2 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-03-06 18:17:20 +01:00
dceab43179 Update .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2025-01-08 10:09:12 -08:00
3wc
f3a59762b4 chore: publish 2.0.1+v4.2.10-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-01 12:36:09 -04:00
3wc
5a88112605 Fix sidekiq image version 2024-08-01 12:33:04 -04:00
3wc
b8e2929bf2 chore: publish 2.0.0+v4.2.10-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-31 12:44:37 -04:00
18a956d084 Merge pull request 'Database backups' (#21) from amras/hometown:backups into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #21
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2024-07-15 09:22:46 +00:00
7525e5826c Create database backups
When running `abra app backup`/`abra app restore`, use `pg_dump -Fc`.

This is the backup strategy recommended by hometown, just abra-ified.
(e.g. Update Steps here: https://github.com/hometown-fork/hometown/releases/tag/v4.2.10%2Bhometown-1.1.1)
2024-07-14 13:53:45 +00:00
2ca92dd55f fix: drop golang templatin'
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-28 22:40:46 +01:00
3wc
080fcd7a2d chore: publish 1.1.9+v4.0.15-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-27 01:30:10 -03:00
3wc
556d73cce8 Further startup fix
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-27 01:26:42 -03:00
3wc
f6c2527182 Run migrations during app startup
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-27 00:55:00 -03:00
3wc
953faaca83 chore: publish 1.1.8+v4.0.15-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-16 18:57:41 -03:00
547cefbd19 chore: publish 1.1.7+v4.0.14-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-15 16:14:49 +01:00
91ed3cf439 chore: publish 1.1.6+v4.0.13-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-12 22:18:27 +00:00
6f31be3458 Bump ENTRYPOINT_CONF_VERSION 2024-02-12 22:16:14 +00:00
3wc
4e8ae43423 chore: publish 1.1.5+v4.0.13-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-01 20:31:28 -03:00
3wc
2e46a01082 chore: publish 1.1.4+v4.0.10-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-11 21:33:16 -03:00
3wc
1155b3cc50 Improve abra.sh and use DB_PASS_FILE 2024-01-11 21:32:36 -03:00
66adadea97 Merge pull request 'Add missing S3_ vars' (#19) from add/missing-s3-vars into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #19
2023-10-31 22:11:54 +00:00
e776970066 Bump recipe version 2023-10-31 21:41:39 +00:00
eab512222a Add missing S3_ vars 2023-10-31 16:06:17 +00:00
9d5e427b80 chore: publish 1.1.2+v4.0.10-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-30 16:32:13 +01:00
c1ca15ff87 bump up the entrypoint version
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-30 15:50:39 +01:00
f4ad09c3b2 chore: publish 1.1.1+v4.0.6-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2023-10-30 15:27:30 +01:00
3fc213854f Merge pull request 'fix links in README' (#16) from amras/hometown:main into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #16
2023-09-11 16:15:55 +00:00
7cec462a60 fix links in README
* opening paragraph previously pointed to git.autonomic.zone's archived repo
* decentral1se/hometown is no longer used in the recipe.

Signed-off-by: Sarma <amras@noreply.git.coopcloud.tech>
2023-09-11 15:04:46 +00:00
acee84e403 Add missing secret env entries
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-07-24 14:10:22 +01:00
307037b36b Move elasticsearch to compose.elasticsearch.yml (#15)
All checks were successful
continuous-integration/drone/push Build is passing
I realised although I had created compose.elasticsearch.yml I had only moved the env vars into it, not the actual service.

Now moved the service and the volume :)

I haven't tried it, but will do soon for bath.social...

Co-authored-by: Nick Sellen <git@nicksellen.co.uk>
Reviewed-on: #15
2023-07-20 12:51:39 +00:00
86bef2441d Merge pull request 'Add S3 configuration' (#14) from add/s3 into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #14
2023-07-19 19:14:59 +00:00
2e446c4467 Add missing file_env entries 2023-07-19 19:29:39 +01:00
21e07e59ed Fix elasticsearch filename 2023-07-19 19:26:01 +01:00
e6f7efaa44 Improve .env.sample COMPOSE_FILE options 2023-07-19 19:26:01 +01:00
2dc49d51e4 Move elasticsearch config into separate yml 2023-07-19 19:26:01 +01:00
754ab9411c Add SECRET_AWS_SECRET_ACCESS_KEY_VERSION 2023-07-19 19:26:01 +01:00
fd89ab14ce Remove S3_ENABLED from .env.sample
It gets enabled by include compose.s3.yml
2023-07-19 19:26:01 +01:00
205a882653 Split S3 config into compose.s3.yml 2023-07-19 19:23:11 +01:00
0bed30c1bf Add S3 vars 2023-07-19 19:22:04 +01:00
3wc
284984d49c Rename release notes dir
All checks were successful
continuous-integration/drone/push Build is passing
Bad docs, bad! 😾
2023-07-18 10:16:23 +01:00
3wc
1338294417 chore: publish 1.0.0+v4.0.6-hometown-1.1.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-16 21:46:20 +01:00
13 changed files with 184 additions and 47 deletions

View File

@ -38,7 +38,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -1,6 +1,6 @@
TYPE=hometown
DOMAIN={{ .Domain }}
DOMAIN=hometown.example.com
# Enables WEB_DOMAIN if set (FOR FUTURE USE)
# USER_DOMAIN=
@ -30,6 +30,7 @@ LOCAL_DOMAIN=$DOMAIN
# ALTERNATE_DOMAINS=$EXTRA_DOMAINS
AUTHORIZED_FETCH=false
DISALLOW_UNAUTHENTICATED_API_ACCESS=false
LIMITED_FEDERATION_MODE=false
# Deployment
@ -53,15 +54,13 @@ DB_PORT=5432
REDIS_HOST=redis
REDIS_PORT=6379
# REDIS_URL=
# REDIS_NAMESPACE=
# CACHE_REDIS_HOST=
# CACHE_REDIS_PORT=
# CACHE_REDIS_URL=
# CACHE_REDIS_NAMESPACE=
# ElasticSearch
# --------------------------------------
ES_ENABLED=true
#COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"
ES_HOST=es
ES_PORT=9200
@ -77,6 +76,10 @@ SECRET_OTP_SECRET_VERSION=v1
SECRET_VAPID_PRIVATE_KEY_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
SECRET_SMTP_PASSWORD_VERSION=v1
SECRET_AWS_SECRET_ACCESS_KEY_VERSION=v1
SECRET_ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY_VERSION=v1
SECRET_ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT_VERSION=v1
SECRET_ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY_VERSION=v1
# Web Push
# ========
@ -118,7 +121,7 @@ DEFAULT_LOCALE=en
# S3 and AWS
# ----------
# S3_ENABLED=
#COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
# S3_BUCKET=
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=

View File

@ -2,7 +2,7 @@
> A supported fork of Mastodon that provides local posting and a wider range of content types.
The configuration aims to stay as close as possible to [coop-cloud/mastodon](https://git.autonomic.zone/coop-cloud/mastodon).
The configuration aims to stay as close as possible to [coop-cloud/mastodon](https://git.coopcloud.tech/coop-cloud/mastodon).
At some point, ideally, we could merge them. We don't have enough folks running
both Mastodon & Hometown to understand if that is a good idea right now. To be
discussed.
@ -11,7 +11,7 @@ discussed.
* **Category**: Apps
* **Status**: 1
* **Image**: [`decentral1se/hometown`](https://hub.docker.com/r/decentral1se/hometown)
* **Image**: [`hometown`](https://git.coopcloud.tech/coop-cloud-chaos-patchs/docker-hometown), 1, Co-op Cloud custom image
* **Healthcheck**: No
* **Backups**: No
* **Email**: Yes

3
abra.sh Executable file → Normal file
View File

@ -1,7 +1,6 @@
#!/bin/bash
export ENTRYPOINT_CONF_VERSION=v7
export ENTRYPOINT_CONF_VERSION=v9
file_env() {
local var="$1"

34
compose.elasticsearch.yml Normal file
View File

@ -0,0 +1,34 @@
---
version: "3.8"
services:
es:
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"
networks:
- internal_network
volumes:
- es:/usr/share/elasticsearch/data
ulimits:
memlock:
soft: -1
hard: -1
app:
environment: &es-env
- ES_ENABLED=true
- ES_HOST
- ES_PORT
streaming:
environment: *es-env
sidekiq:
environment: *es-env
volumes:
es:

35
compose.s3.yml Normal file
View File

@ -0,0 +1,35 @@
---
version: "3.8"
services:
app:
environment: &s3-env
- S3_ENABLED=true
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY_FILE=/run/secrets/aws_secret_access_key
- S3_BUCKET
- S3_REGION
- S3_PROTOCOL
- S3_HOSTNAME
- S3_ENDPOINT
- S3_SIGNATURE_VERSION
- S3_OVERRIDE_PATH_STYLE
- S3_OPEN_TIMEOUT
- S3_READ_TIMEOUT
- S3_FORCE_SINGLE_REQUEST
- S3_ALIAS_HOST
secrets: &s3-secrets
- aws_secret_access_key
streaming:
environment: *s3-env
secrets: *s3-secrets
sidekiq:
environment: *s3-env
secrets: *s3-secrets
secrets:
aws_secret_access_key:
name: ${STACK_NAME}_aws_secret_access_key_${SECRET_AWS_SECRET_ACCESS_KEY_VERSION}
external: true

View File

@ -3,8 +3,8 @@ version: "3.8"
services:
app:
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v3.5.10-hometown-1.0.8
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v4.5.11-hometown-1.2.1
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rake db:migrate; bundle exec rails s -p 3000"
networks: &bothNetworks
- proxy
- internal_network
@ -19,9 +19,12 @@ services:
- "traefik.http.routers.${STACK_NAME}_web.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}_web.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}_web.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=0.2.3+v3.5.10-hometown-1.0.8"
- "coop-cloud.${STACK_NAME}.version=3.0.1+v4.5.11-hometown-1.2.1"
configs: &configs
- source: entrypoint_sh
- source: entrypoint_common_sh
target: /usr/local/bin/entrypoint.common.sh
mode: 0555
- source: entrypoint_main_sh
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: &entrypoint /usr/local/bin/entrypoint.sh
@ -33,12 +36,17 @@ services:
- secret_key_base
- smtp_password
- vapid_private_key
- enc_det_key
- enc_salt
- enc_pri_key
environment: &env
- ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY_FILE=/run/secrets/enc_det_key
- ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT_FILE=/run/secrets/enc_salt
- ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY_FILE=/run/secrets/enc_pri_key
- ALLOW_ACCESS_TO_HIDDEN_SERVICE
- ALTERNATE_DOMAINS
- AUTHORIZED_FETCH
- CACHE_REDIS_HOST
- CACHE_REDIS_NAMESPACE
- CACHE_REDIS_PORT
- CACHE_REDIS_URL
- DB_HOST
@ -47,11 +55,9 @@ services:
- DB_USER
- DB_PASS_FILE=/run/secrets/db_password
- DEFAULT_LOCALE
- DISALLOW_UNAUTHENTICATED_API_ACCESS
- EMAIL_DOMAIN_ALLOWLIST
- EMAIL_DOMAIN_DENYLIST
- ES_ENABLED
- ES_HOST
- ES_PORT
- LDAP_BASE
- LDAP_BIND_DN
- LDAP_ENABLED
@ -68,7 +74,6 @@ services:
- MAX_SESSION_ACTIVATIONS
- MAX_TOOT_CHARS
- OAUTH_REDIRECT_AT_SIGN_IN
- OTP_SECRET_FILE=/run/secrets/otp_secret
- OIDC_AUTH_ENDPOINT
- OIDC_CLIENT_AUTH_METHOD
- OIDC_CLIENT_ID
@ -94,12 +99,12 @@ services:
- OIDC_TOKEN_ENDPOINT
- OIDC_UID_FIELD
- OIDC_USER_INFO_ENDPOINT
- OTP_SECRET_FILE=/run/secrets/otp_secret
- PAPERCLIP_ROOT_PATH
- PAPERCLIP_ROOT_URL
- RAILS_ENV
- RAILS_SERVE_STATIC_FILES
- REDIS_HOST
- REDIS_NAMESPACE
- REDIS_PORT
- REDIS_URL
- SAML_ACS_URL
@ -145,9 +150,15 @@ services:
- WEB_DOMAIN
streaming:
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v3.5.10-hometown-1.0.8
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v4.5.11-hometown-1.2.1-streaming
command: node ./streaming
configs: *configs
configs:
- source: entrypoint_common_sh
target: /usr/local/bin/entrypoint.common.sh
mode: 0555
- source: entrypoint_streaming_sh
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: *entrypoint
secrets: *secrets
networks: *bothNetworks
@ -166,7 +177,7 @@ services:
volumes: *appVolume # used to make sure this volume is created
sidekiq:
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v3.5.10-hometown-1.0.8
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v4.5.11-hometown-1.2.1
secrets: *secrets
command: bundle exec sidekiq
configs: *configs
@ -180,7 +191,7 @@ services:
environment: *env
db:
image: postgres:14.5-alpine
image: postgres:14.10-alpine
networks: &internalNetwork
- internal_network
volumes:
@ -191,31 +202,23 @@ services:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_USER=${DB_USER}
deploy:
labels:
- "backupbot.backup=true"
- "backupbot.backup.pre-hook=sh -c \"mkdir -p /var/backup/hometown; /usr/local/bin/pg_dump -Fc -U ${DB_USER} ${DB_NAME} > /var/backup/hometown/backupbot.dump\""
- "backupbot.backup.path=/var/backup/hometown"
- "backupbot.backup.post-hook=rm -f /var/backup/hometown/backupbot.dump"
- "backupbot.restore.post-hook=sh -c \"/usr/local/bin/pg_restore -U ${DB_USER} -d ${DB_NAME} -1 /var/backup/hometown/backupbot.dump\""
redis:
image: redis:7.0-alpine
image: redis:7.4-alpine
networks: *internalNetwork
healthcheck:
test: ["CMD", "redis-cli", "ping"]
volumes:
- redis:/data
es:
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"
networks:
- internal_network
volumes:
- es:/usr/share/elasticsearch/data
ulimits:
memlock:
soft: -1
hard: -1
secrets:
secret_key_base:
name: ${STACK_NAME}_secret_key_base_${SECRET_SECRET_KEY_BASE_VERSION}
@ -232,12 +235,20 @@ secrets:
smtp_password:
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}
external: true
enc_det_key:
name: ${STACK_NAME}_enc_det_key_${SECRET_ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY_VERSION}
external: true
enc_salt:
name: ${STACK_NAME}_enc_salt_${SECRET_ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT_VERSION}
external: true
enc_pri_key:
name: ${STACK_NAME}_enc_pri_key_${SECRET_ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY_VERSION}
external: true
volumes:
app:
redis:
postgres:
es:
networks:
proxy:
@ -246,7 +257,15 @@ networks:
internal: true
configs:
entrypoint_sh:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
entrypoint_common_sh:
name: ${STACK_NAME}_ep_common_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.common.sh.tmpl
template_driver: golang
entrypoint_main_sh:
name: ${STACK_NAME}_ep_main_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.main.sh.tmpl
template_driver: golang
entrypoint_streaming_sh:
name: ${STACK_NAME}_ep_streaming_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.streaming.sh.tmpl
template_driver: golang

View File

@ -24,14 +24,17 @@ file_env() {
}
# for sidekiq service bundle exec env var threading
file_env "DB_PASS"
file_env "OTP_SECRET"
file_env "SECRET_KEY_BASE"
file_env "DB_PASS"
file_env "SMTP_PASSWORD"
file_env "VAPID_PRIVATE_KEY"
file_env "AWS_SECRET_ACCESS_KEY"
file_env "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY"
file_env "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT"
file_env "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY"
{{ if eq (env "OIDC_ENABLED") "true" }}
file_env "OIDC_CLIENT_SECRET"
{{ end }}
/usr/bin/tini -s -- "$@"

6
entrypoint.main.sh.tmpl Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
source entrypoint.common.sh
/usr/bin/tini -s -- "$@"

View File

@ -0,0 +1,6 @@
#!/bin/bash
source entrypoint.common.sh
node ./streaming/index.js

View File

@ -0,0 +1,11 @@
Mastodon 4 requires running pre- and post-deployment migrations, something like
```
abra app run your.app.domain app bash -c "SKIP_POST_DEPLOYMENT_MIGRATIONS=true rails db:migrate"
abra app restart your.app.domain app
abra app restart your.app.domain streaming
abra app restart your.app.domain sidekiq
abra app run your.app.domain app rails db:migrate
```
See the full release notes for details: https://github.com/mastodon/mastodon/releases/tag/v4.0.0

View File

@ -0,0 +1,20 @@
!!! It is recommended to update to this version before moving on to later updates !!!
- Redis Namespaces are no longer supported! If you use REDIS_NAMESPACE or CACHE_REDIS_NAMESPACE in your config, you'll have to remove it.
- Three new secrets have been introduced:
* Add the keys to your env:
SECRET_ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY_VERSION=v1
SECRET_ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT_VERSION=v1
SECRET_ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY_VERSION=v1
* Create the keys, e.g. with `abra app secret generate -a your.app.domain`
- As with every mastodon upgrade, you'll need to migrate databases by running:
```
abra app run your.app.domain app bash -c "SKIP_POST_DEPLOYMENT_MIGRATIONS=true rails db:migrate"
abra app undeploy your.app.domain
abra app deploy your.app.domain
abra app run your.app.domain app rails db:migrate
```
See the full release notes for details: https://github.com/hometown-fork/hometown/releases/tag/v4.5.6%2Bhometown-1.2.0

View File

@ -0,0 +1 @@
No migration necessary, but backing up the database is recommended.