mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
implemented mastodon
This commit is contained in:
parent
6a17d1ced1
commit
45841aceac
@ -3,8 +3,27 @@
|
|||||||
```bash
|
```bash
|
||||||
docker-compose run --rm web bundle exec rake mastodon:setup
|
docker-compose run --rm web bundle exec rake mastodon:setup
|
||||||
```
|
```
|
||||||
|
## cleanup
|
||||||
|
```bash
|
||||||
|
cd /home/administrator/docker-compose/mastodon/
|
||||||
|
docker-compose down
|
||||||
|
docker volume rm mastodon_data mastodon_database mastodon_redis
|
||||||
|
cd /home/administrator/docker-compose/ &&
|
||||||
|
rm -vR /home/administrator/docker-compose/mastodon
|
||||||
|
```
|
||||||
|
|
||||||
|
## access terminal
|
||||||
|
```bash
|
||||||
|
docker exec -it mastodon-streaming-1 /bin/bash
|
||||||
|
```
|
||||||
|
|
||||||
|
## set rights
|
||||||
|
```bash
|
||||||
|
docker exec -it mastodon-streaming-1 chown -R 991:991 public
|
||||||
|
```
|
||||||
|
|
||||||
## further information
|
## further information
|
||||||
- https://goneuland.de/mastodon-mit-docker-und-traefik-installieren/
|
- https://goneuland.de/mastodon-mit-docker-und-traefik-installieren/
|
||||||
- https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4
|
- https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4
|
||||||
- https://www.2daygeek.com/linux-command-check-website-is-up-down-alive/
|
- https://www.2daygeek.com/linux-command-check-website-is-up-down-alive/
|
||||||
|
- https://vitobotta.com/2022/11/07/setting-up-a-personal-mastodon-instance/
|
@ -12,35 +12,10 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: register directory
|
|
||||||
stat:
|
|
||||||
path: "{{docker_compose_mastodon_path}}}"
|
|
||||||
register: docker_compose_mastodon_path_register
|
|
||||||
|
|
||||||
- name: checkout repository
|
|
||||||
ansible.builtin.shell: git checkout .
|
|
||||||
become: true
|
|
||||||
args:
|
|
||||||
chdir: "{{docker_compose_mastodon_path}}"
|
|
||||||
when: docker_compose_mastodon_path_register.stat.exists
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: pull docker repository
|
|
||||||
git:
|
|
||||||
repo: "https://github.com/tootsuite/mastodon.git"
|
|
||||||
dest: "{{docker_compose_mastodon_path}}"
|
|
||||||
update: yes
|
|
||||||
#notify: recreate mastodon
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: copy docker-compose.yml
|
- name: copy docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_mastodon_path}}docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_mastodon_path}}docker-compose.yml
|
||||||
#notify: recreate mastodon
|
notify: recreate mastodon
|
||||||
|
|
||||||
- name: copy configuration
|
- name: copy configuration
|
||||||
template: src=.env.production.j2 dest={{docker_compose_mastodon_path}}.env.production
|
template: src=.env.production.j2 dest={{docker_compose_mastodon_path}}.env.production
|
||||||
#notify: recreate mastodon
|
notify: recreate mastodon
|
||||||
|
|
||||||
- name: add docker-compose.yml
|
|
||||||
template: src=docker-compose.yml.j2 dest={{docker_compose_mastodon_path}}docker-compose.yml
|
|
||||||
#notify: recreate mastodon
|
|
||||||
|
@ -1,52 +1,22 @@
|
|||||||
LOCAL_DOMAIN={{domain}}
|
LOCAL_DOMAIN={{domain}}
|
||||||
|
SINGLE_USER_MODE=true
|
||||||
# Redis
|
SECRET_KEY_BASE={{mastodon_secret_key_base}}
|
||||||
# -----
|
OTP_SECRET={{mastodon_otp_secret}}
|
||||||
REDIS_HOST=localhost
|
VAPID_PRIVATE_KEY={{mastodon_vapid_private_key}}
|
||||||
REDIS_PORT=6379
|
VAPID_PUBLIC_KEY={{mastodon_vapid_public_key}}
|
||||||
|
|
||||||
# PostgreSQL
|
|
||||||
# ----------
|
|
||||||
DB_HOST=database
|
DB_HOST=database
|
||||||
DB_USER=mastodon
|
DB_PORT=5432
|
||||||
DB_NAME=mastodon
|
DB_NAME=postgres
|
||||||
DB_PASS={{mastodon_database_password}}
|
DB_USER=postgres
|
||||||
DB_PORT=3306
|
DB_PASS=
|
||||||
|
REDIS_HOST=redis
|
||||||
# Secrets
|
REDIS_PORT=6379
|
||||||
# -------
|
REDIS_PASSWORD=
|
||||||
# Make sure to use `rake secret` to generate secrets
|
SMTP_SERVER={{system_email_host}}
|
||||||
# -------
|
|
||||||
SECRET_KEY_BASE=
|
|
||||||
OTP_SECRET=
|
|
||||||
|
|
||||||
# Web Push
|
|
||||||
# --------
|
|
||||||
# Generate with `rake mastodon:webpush:generate_vapid_key`
|
|
||||||
# --------
|
|
||||||
VAPID_PRIVATE_KEY=
|
|
||||||
VAPID_PUBLIC_KEY=
|
|
||||||
|
|
||||||
# Sending mail
|
|
||||||
# ------------
|
|
||||||
SMTP_SERVER=smtp.mailgun.org
|
|
||||||
SMTP_PORT=587
|
SMTP_PORT=587
|
||||||
SMTP_LOGIN=
|
SMTP_LOGIN={{system_email_username}}
|
||||||
SMTP_PASSWORD=
|
SMTP_PASSWORD={{system_email_password}}
|
||||||
SMTP_FROM_ADDRESS=notifications@example.com
|
SMTP_AUTH_METHOD=plain
|
||||||
|
SMTP_OPENSSL_VERIFY_MODE=none
|
||||||
# File storage (optional)
|
SMTP_ENABLE_STARTTLS=auto
|
||||||
# -----------------------
|
SMTP_FROM_ADDRESS=Mastodon <{{system_email_username}}>
|
||||||
S3_ENABLED=true
|
|
||||||
S3_BUCKET=files.example.com
|
|
||||||
AWS_ACCESS_KEY_ID=
|
|
||||||
AWS_SECRET_ACCESS_KEY=
|
|
||||||
S3_ALIAS_HOST=files.example.com
|
|
||||||
|
|
||||||
# IP and session retention
|
|
||||||
# -----------------------
|
|
||||||
# Make sure to modify the scheduling of ip_cleanup_scheduler in config/sidekiq.yml
|
|
||||||
# to be less than daily if you lower IP_RETENTION_PERIOD below two days (172800).
|
|
||||||
# -----------------------
|
|
||||||
IP_RETENTION_PERIOD=31556952
|
|
||||||
SESSION_RETENTION_PERIOD=31556952
|
|
||||||
|
@ -1,23 +1,19 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
|
restart: always
|
||||||
|
image: postgres:14-alpine
|
||||||
|
shm_size: 256mb
|
||||||
|
networks:
|
||||||
|
- internal_network
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||||
|
volumes:
|
||||||
|
- database:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: mariadb:10.5
|
|
||||||
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
|
|
||||||
environment:
|
|
||||||
MYSQL_DATABASE: "mastodon"
|
|
||||||
MYSQL_USER: "mastodon"
|
|
||||||
MYSQL_PASSWORD: "{{mastodon_database_password}}"
|
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
|
||||||
volumes:
|
|
||||||
- database:/var/lib/mysql
|
|
||||||
restart: always
|
|
||||||
healthcheck:
|
|
||||||
test: "/usr/bin/mysql --user=mastodon --password={{mastodon_database_password}} --execute \"SHOW DATABASES;\""
|
|
||||||
interval: 3s
|
|
||||||
timeout: 1s
|
|
||||||
retries: 5
|
|
||||||
redis:
|
redis:
|
||||||
restart: always
|
restart: always
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
@ -27,9 +23,9 @@ services:
|
|||||||
test: ['CMD', 'redis-cli', 'ping']
|
test: ['CMD', 'redis-cli', 'ping']
|
||||||
volumes:
|
volumes:
|
||||||
- redis:/data
|
- redis:/data
|
||||||
|
logging:
|
||||||
|
driver: journald
|
||||||
web:
|
web:
|
||||||
build: .
|
|
||||||
image: tootsuite/mastodon:{{mastodon_version}}
|
image: tootsuite/mastodon:{{mastodon_version}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
@ -47,9 +43,9 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
|
logging:
|
||||||
|
driver: journald
|
||||||
streaming:
|
streaming:
|
||||||
build: .
|
|
||||||
image: tootsuite/mastodon:{{mastodon_version}}
|
image: tootsuite/mastodon:{{mastodon_version}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
@ -65,9 +61,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
- redis
|
- redis
|
||||||
|
logging:
|
||||||
|
driver: journald
|
||||||
sidekiq:
|
sidekiq:
|
||||||
build: .
|
|
||||||
image: tootsuite/mastodon:{{mastodon_version}}
|
image: tootsuite/mastodon:{{mastodon_version}}
|
||||||
restart: always
|
restart: always
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
@ -82,6 +78,8 @@ services:
|
|||||||
- data:/mastodon/public/system
|
- data:/mastodon/public/system
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||||
|
logging:
|
||||||
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
database:
|
database:
|
||||||
redis:
|
redis:
|
||||||
|
Loading…
Reference in New Issue
Block a user