Compare commits
6 Commits
update-121
...
mastodon_3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8921575d11 | |||
| d52a8ad910 | |||
| 673667e2bf | |||
| dfa48a0a47 | |||
| 84e3c0ceff | |||
| 6dbe7124d2 |
@ -38,7 +38,7 @@ steps:
|
||||
from_secret: drone_abra-bot_token
|
||||
fork: true
|
||||
repositories:
|
||||
- toolshed/auto-recipes-catalogue-json
|
||||
- coop-cloud/auto-recipes-catalogue-json
|
||||
|
||||
trigger:
|
||||
event: tag
|
||||
|
||||
13
.env.sample
13
.env.sample
@ -1,6 +1,6 @@
|
||||
TYPE=hometown
|
||||
|
||||
DOMAIN=hometown.example.com
|
||||
DOMAIN={{ .Domain }}
|
||||
# Enables WEB_DOMAIN if set (FOR FUTURE USE)
|
||||
# USER_DOMAIN=
|
||||
|
||||
@ -30,7 +30,6 @@ LOCAL_DOMAIN=$DOMAIN
|
||||
|
||||
# ALTERNATE_DOMAINS=$EXTRA_DOMAINS
|
||||
AUTHORIZED_FETCH=false
|
||||
DISALLOW_UNAUTHENTICATED_API_ACCESS=false
|
||||
LIMITED_FEDERATION_MODE=false
|
||||
|
||||
# Deployment
|
||||
@ -54,13 +53,15 @@ 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
|
||||
# --------------------------------------
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"
|
||||
ES_ENABLED=true
|
||||
ES_HOST=es
|
||||
ES_PORT=9200
|
||||
|
||||
@ -76,10 +77,6 @@ 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
|
||||
# ========
|
||||
@ -121,7 +118,7 @@ DEFAULT_LOCALE=en
|
||||
|
||||
# S3 and AWS
|
||||
# ----------
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
|
||||
# S3_ENABLED=
|
||||
# S3_BUCKET=
|
||||
# AWS_ACCESS_KEY_ID=
|
||||
# AWS_SECRET_ACCESS_KEY=
|
||||
|
||||
@ -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.coopcloud.tech/coop-cloud/mastodon).
|
||||
The configuration aims to stay as close as possible to [coop-cloud/mastodon](https://git.autonomic.zone/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**: [`hometown`](https://git.coopcloud.tech/coop-cloud-chaos-patchs/docker-hometown), 1, Co-op Cloud custom image
|
||||
* **Image**: [`decentral1se/hometown`](https://hub.docker.com/r/decentral1se/hometown)
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Email**: Yes
|
||||
|
||||
3
abra.sh
Normal file → Executable file
3
abra.sh
Normal file → Executable file
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
export ENTRYPOINT_CONF_VERSION=v9
|
||||
export ENTRYPOINT_CONF_VERSION=v7
|
||||
|
||||
|
||||
file_env() {
|
||||
local var="$1"
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
---
|
||||
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:
|
||||
@ -1,35 +0,0 @@
|
||||
---
|
||||
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
|
||||
89
compose.yml
89
compose.yml
@ -3,8 +3,8 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
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"
|
||||
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"
|
||||
networks: &bothNetworks
|
||||
- proxy
|
||||
- internal_network
|
||||
@ -19,12 +19,9 @@ 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=3.0.1+v4.5.11-hometown-1.2.1"
|
||||
- "coop-cloud.${STACK_NAME}.version=0.2.3+v3.5.10-hometown-1.0.8"
|
||||
configs: &configs
|
||||
- source: entrypoint_common_sh
|
||||
target: /usr/local/bin/entrypoint.common.sh
|
||||
mode: 0555
|
||||
- source: entrypoint_main_sh
|
||||
- source: entrypoint_sh
|
||||
target: /usr/local/bin/entrypoint.sh
|
||||
mode: 0555
|
||||
entrypoint: &entrypoint /usr/local/bin/entrypoint.sh
|
||||
@ -36,17 +33,12 @@ 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
|
||||
@ -55,9 +47,11 @@ 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
|
||||
@ -74,6 +68,7 @@ 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
|
||||
@ -99,12 +94,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
|
||||
@ -150,15 +145,9 @@ services:
|
||||
- WEB_DOMAIN
|
||||
|
||||
streaming:
|
||||
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v4.5.11-hometown-1.2.1-streaming
|
||||
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v3.5.10-hometown-1.0.8
|
||||
command: node ./streaming
|
||||
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
|
||||
configs: *configs
|
||||
entrypoint: *entrypoint
|
||||
secrets: *secrets
|
||||
networks: *bothNetworks
|
||||
@ -177,7 +166,7 @@ services:
|
||||
volumes: *appVolume # used to make sure this volume is created
|
||||
|
||||
sidekiq:
|
||||
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v4.5.11-hometown-1.2.1
|
||||
image: git.coopcloud.tech/coop-cloud-chaos-patchs/hometown:v3.5.10-hometown-1.0.8
|
||||
secrets: *secrets
|
||||
command: bundle exec sidekiq
|
||||
configs: *configs
|
||||
@ -191,7 +180,7 @@ services:
|
||||
environment: *env
|
||||
|
||||
db:
|
||||
image: postgres:14.10-alpine
|
||||
image: postgres:14.5-alpine
|
||||
networks: &internalNetwork
|
||||
- internal_network
|
||||
volumes:
|
||||
@ -202,23 +191,31 @@ 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.4-alpine
|
||||
image: redis:7.0-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}
|
||||
@ -235,20 +232,12 @@ 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:
|
||||
@ -257,15 +246,7 @@ networks:
|
||||
internal: true
|
||||
|
||||
configs:
|
||||
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
|
||||
entrypoint_sh:
|
||||
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
|
||||
file: entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source entrypoint.common.sh
|
||||
|
||||
/usr/bin/tini -s -- "$@"
|
||||
|
||||
@ -24,17 +24,14 @@ 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 -- "$@"
|
||||
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
source entrypoint.common.sh
|
||||
|
||||
node ./streaming/index.js
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
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
|
||||
@ -1,20 +0,0 @@
|
||||
!!! 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
|
||||
@ -1 +0,0 @@
|
||||
No migration necessary, but backing up the database is recommended.
|
||||
Reference in New Issue
Block a user