Compare commits

...

10 commits

Author SHA1 Message Date
nikurasu 5a0abbfd7b Switched to Hometown fork 2022-12-03 16:34:49 +01:00
LinuxServer-CI 7aed65d85d Bot Updating Templated Files 2022-11-30 05:47:21 +01:00
LinuxServer-CI c66ff879d0 Bot Updating Templated Files 2022-11-30 05:46:11 +01:00
LinuxServer-CI 6c4bef2401 Bot Updating Templated Files 2022-11-30 05:44:51 +01:00
Roxedus 1d49a7b21f
Merge pull request #15 from linuxserver/tune-chown 2022-11-27 23:21:49 +01:00
TheSpad f8cfb9546d
Tweak readme wording, add links 2022-11-27 21:45:11 +00:00
TheSpad 8366b63374
Consistency 2022-11-27 21:36:35 +00:00
TheSpad 47974c8756
Don't recursively chown 2022-11-27 21:35:34 +00:00
TheSpad 94535578c4
Add proxying note 2022-11-24 18:08:29 +00:00
TheSpad eabd4e92e7
Don't chown /config/mastodon/ to speed up init 2022-11-23 16:39:23 +00:00
17 changed files with 211 additions and 93 deletions

View file

@ -1,40 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
<!--- Provide a general summary of the bug in the Title above -->
------------------------------
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Environment
**OS:**
**CPU architecture:** x86_64/arm32/arm64
**How docker service was installed:**
<!--- ie. from the official docker repo, from the distro repo, nas OS provided, etc. -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Command used to create docker container (run/create/compose/screenshot)
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
## Docker logs
<!--- Provide a full docker log, output of "docker logs mastodon" -->

76
.github/ISSUE_TEMPLATE/issue.bug.yml vendored Executable file
View file

@ -0,0 +1,76 @@
# Based on the issue template
name: Bug report
description: Create a report to help us improve
title: "[BUG] <title>"
labels: [Bug]
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: Tell us what happens instead of the expected behavior.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: Tell us what should happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **How docker service was installed**: distro's packagemanager
value: |
- OS:
- How docker service was installed:
render: markdown
validations:
required: false
- type: dropdown
attributes:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea
attributes:
label: Docker creation
description: |
Command used to create docker container
Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container
render: bash
validations:
required: true
- type: textarea
attributes:
description: |
Provide a full docker log, output of "docker logs linuxserver.io"
label: Container logs
placeholder: |
Output of `docker logs linuxserver.io`
render: bash
validations:
required: true

View file

@ -1,25 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
---
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. --->
<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from --->
<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- Provide a general summary of the request in the Title above -->
------------------------------
## Desired Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Alternatives Considered
<!--- Tell us what other options you have tried or considered -->

31
.github/ISSUE_TEMPLATE/issue.feature.yml vendored Executable file
View file

@ -0,0 +1,31 @@
# Based on the issue template
name: Feature request
description: Suggest an idea for this project
title: "[FEAT] <title>"
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Is this a new feature request?
description: Please search to see if a feature request already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Wanted change
description: Tell us what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Reason for change
description: Justify your request, why do you want it, what is the benefit.
validations:
required: true
- type: textarea
attributes:
label: Proposed code change
description: Do you have a potential code change in mind?
validations:
required: false

View file

@ -7,7 +7,7 @@ jobs:
external-trigger-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v3.1.0
- name: External Trigger
if: github.ref == 'refs/heads/main'

View file

@ -9,7 +9,7 @@ jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v3.1.0
with:
fetch-depth: '0'

View file

@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-mastodon/blob/main/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-mastodon/blob/main/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-mastodon/blob/main/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-mastodon/blob/main/.github/ISSUE_TEMPLATE/issue.feature.yml) issue templates!'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-mastodon/blob/main/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -7,7 +7,7 @@ jobs:
package-trigger-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v3.1.0
- name: Package Trigger
if: github.ref == 'refs/heads/main'

View file

@ -9,7 +9,7 @@ jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v3.1.0
with:
fetch-depth: '0'

View file

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v6.0.1
with:
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions."

View file

@ -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 && \

View file

@ -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 && \

4
Jenkinsfile vendored
View file

@ -59,7 +59,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
}
script{
env.LS_RELEASE_NUMBER = sh(
@ -287,7 +287,7 @@ pipeline {
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"

View file

@ -80,6 +80,10 @@ We support all of the official [environment variables](https://docs.joinmastodon
For more information check out the [mastodon documentation](https://docs.joinmastodon.org/).
### Strict reverse proxies
This image automatically redirects to https with a self-signed certificate. If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
## Usage
Here are some example snippets to help you get started creating a container.
@ -206,7 +210,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e SMTP_PASSWORD=` | SMTP password |
| `-e SMTP_FROM_ADDRESS=notifications@example.com` | From address for emails send from Mastodon |
| `-e S3_ENABLED=false` | Enable or disable S3 storage of uploaded files |
| `-e WEB_DOMAIN=mastodon.example.com` | This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See https://docs.joinmastodon.org/admin/config/#basic |
| `-e WEB_DOMAIN=mastodon.example.com` | This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See [https://docs.joinmastodon.org/admin/config/#basic](https://docs.joinmastodon.org/admin/config/#basic) |
| `-e ES_HOST=es` | Elasticsearch server hostname |
| `-e ES_PORT=9200` | Elasticsearch port |
| `-e ES_USER=elastic` | Elasticsearch username |

66
docker-compose.yml Normal file
View file

@ -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:

View file

@ -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:
@ -49,7 +50,7 @@ param_env_vars:
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "WEB_DOMAIN", env_value: "mastodon.example.com", desc: "This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See https://docs.joinmastodon.org/admin/config/#basic"}
- { env_var: "WEB_DOMAIN", env_value: "mastodon.example.com", desc: "This can be set if you want your server identifier to be different to the subdomain hosting Mastodon. See [https://docs.joinmastodon.org/admin/config/#basic](https://docs.joinmastodon.org/admin/config/#basic)"}
- { env_var: "ES_HOST", env_value: "es", desc: "Elasticsearch server hostname"}
- { env_var: "ES_PORT", env_value: "9200", desc: "Elasticsearch port"}
- { env_var: "ES_USER", env_value: "elastic", desc: "Elasticsearch username"}
@ -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" }
@ -83,6 +85,10 @@ app_setup_block: |
For more information check out the [mastodon documentation](https://docs.joinmastodon.org/).
### Strict reverse proxies
This image automatically redirects to https with a self-signed certificate. If you are using a reverse proxy which validates certificates, you need to [disable this check for the container](https://docs.linuxserver.io/faq#strict-proxy).
# changelog
changelogs:
- { date: "05.11.22:", desc: "Initial Release." }
- { date: "05.11.22:", desc: "Initial Release." }

View file

@ -17,5 +17,5 @@ cd /app/www/ || exit 1
s6-setuidgid abc /usr/bin/bundle exec rails db:prepare
chown -R abc:abc \
/config
chown abc:abc \
/config/mastodon/public/system