mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Merged client playbook and server playbook
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
# role docker-pixelfed
|
||||
|
||||
## hard cleanup
|
||||
```bash
|
||||
docker-compose down
|
||||
docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis_data
|
||||
```
|
||||
|
||||
## update
|
||||
```bash
|
||||
cd /home/administrator/docker-compose/pixelfed/ &&
|
||||
docker-compose down &&
|
||||
docker network prune -f &&
|
||||
docker-compose pull &&
|
||||
docker-compose build &&
|
||||
docker-compose -p pixelfed up -d --force-recreate
|
||||
```
|
||||
|
||||
## inspect
|
||||
|
||||
```bash
|
||||
docker-compose ps -a
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
## further information
|
||||
- https://hub.docker.com/r/zknt/pixelfed
|
||||
- https://blog.pixelfed.de/2020/05/29/pixelfed-in-docker/
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: recreate pixelfed
|
||||
command:
|
||||
cmd: docker-compose -p pixelfed up -d --force-recreate
|
||||
chdir: /home/administrator/docker-compose/pixelfed/
|
||||
environment:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@@ -1,2 +0,0 @@
|
||||
dependencies:
|
||||
- native-docker-reverse-proxy
|
@@ -1,25 +0,0 @@
|
||||
---
|
||||
- name: recieve {{domain}} certificate
|
||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
||||
|
||||
- name: configure {{domain}}.conf
|
||||
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{docker_compose_path}}"
|
||||
file:
|
||||
path: "{{docker_compose_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||
notify: recreate pixelfed
|
||||
|
||||
- name: add env
|
||||
template:
|
||||
src: env.j2
|
||||
dest: "{{docker_compose_path}}env"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: recreate pixelfed
|
@@ -1,68 +0,0 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
application:
|
||||
image: zknt/pixelfed
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
env_file:
|
||||
- ./env
|
||||
volumes:
|
||||
- "application_data:/var/www/storage"
|
||||
- "./env:/var/www/.env"
|
||||
ports:
|
||||
- "{{http_port}}:80"
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
worker:
|
||||
image: zknt/pixelfed
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
env_file:
|
||||
- ./env
|
||||
volumes:
|
||||
- "application_data:/var/www/storage"
|
||||
- "./env:/var/www/.env"
|
||||
entrypoint: /worker-entrypoint.sh
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
- application
|
||||
healthcheck:
|
||||
test: php artisan horizon:status | grep running
|
||||
interval: 60s
|
||||
timeout: 5s
|
||||
retries: 1
|
||||
database:
|
||||
logging:
|
||||
driver: journald
|
||||
image: mariadb
|
||||
restart: always
|
||||
env_file:
|
||||
- ./env
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: "/usr/bin/mysql --user=pixelfed --password={{pixelfed_database_password}} --execute \"SHOW DATABASES;\""
|
||||
interval: 3s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 1s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
volumes:
|
||||
database:
|
||||
redis_data:
|
||||
application_data:
|
@@ -1,138 +0,0 @@
|
||||
## Crypto
|
||||
APP_KEY={{pixelfed_app_key}}
|
||||
|
||||
## General Settings
|
||||
APP_NAME="{{pixelfed_app_name}}"
|
||||
APP_ENV=production
|
||||
APP_DEBUG=false
|
||||
APP_URL=https://{{domain}}
|
||||
APP_DOMAIN="{{domain}}"
|
||||
ADMIN_DOMAIN="{{domain}}"
|
||||
SESSION_DOMAIN="{{domain}}"
|
||||
|
||||
OPEN_REGISTRATION=false
|
||||
ENFORCE_EMAIL_VERIFICATION=false
|
||||
PF_MAX_USERS=1000
|
||||
OAUTH_ENABLED=true
|
||||
|
||||
APP_TIMEZONE=UTC
|
||||
APP_LOCALE=en
|
||||
|
||||
## Pixelfed Tweaks
|
||||
LIMIT_ACCOUNT_SIZE=true
|
||||
MAX_ACCOUNT_SIZE=1000000
|
||||
MAX_PHOTO_SIZE=15000
|
||||
MAX_AVATAR_SIZE=2000
|
||||
MAX_CAPTION_LENGTH=500
|
||||
MAX_BIO_LENGTH=125
|
||||
MAX_NAME_LENGTH=30
|
||||
MAX_ALBUM_LENGTH=4
|
||||
IMAGE_QUALITY=80
|
||||
PF_OPTIMIZE_IMAGES=true
|
||||
PF_OPTIMIZE_VIDEOS=true
|
||||
ADMIN_ENV_EDITOR=false
|
||||
ACCOUNT_DELETION=true
|
||||
ACCOUNT_DELETE_AFTER=false
|
||||
MAX_LINKS_PER_POST=0
|
||||
|
||||
## Instance
|
||||
#INSTANCE_DESCRIPTION=
|
||||
INSTANCE_PUBLIC_HASHTAGS=false
|
||||
#INSTANCE_CONTACT_EMAIL=
|
||||
INSTANCE_PUBLIC_LOCAL_TIMELINE=false
|
||||
#BANNED_USERNAMES=
|
||||
STORIES_ENABLED=false
|
||||
RESTRICTED_INSTANCE=false
|
||||
|
||||
## Mail
|
||||
MAIL_DRIVER=log
|
||||
MAIL_HOST={{system_email_host}}
|
||||
MAIL_PORT={{system_email_port}}
|
||||
MAIL_FROM_ADDRESS="{{system_email_username}}"
|
||||
MAIL_FROM_NAME="Pixelfed"
|
||||
MAIL_USERNAME={{system_email_username}}
|
||||
MAIL_PASSWORD={{system_email_password}}
|
||||
MAIL_ENCRYPTION=tls
|
||||
|
||||
## Databases (MySQL)
|
||||
DB_CONNECTION=mysql
|
||||
DB_DATABASE=pixelfed
|
||||
DB_HOST=database
|
||||
DB_PASSWORD="{{pixelfed_database_password}}"
|
||||
DB_PORT=3306
|
||||
DB_USERNAME=pixelfed
|
||||
# pass the same values to the db itself
|
||||
MYSQL_DATABASE="pixelfed"
|
||||
MYSQL_USER="pixelfed"
|
||||
MYSQL_PASSWORD="{{pixelfed_database_password}}"
|
||||
MYSQL_ROOT_PASSWORD="{{pixelfed_database_password}}"
|
||||
MARIADB_AUTO_UPGRADE="1"
|
||||
|
||||
## Cache (Redis)
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_SCHEME=tcp
|
||||
REDIS_HOST=redis
|
||||
#REDIS_PASSWORD=
|
||||
REDIS_PORT=6379
|
||||
REDIS_DATABASE=0
|
||||
|
||||
HORIZON_PREFIX="horizon-"
|
||||
|
||||
## EXPERIMENTS
|
||||
EXP_LC=false
|
||||
EXP_REC=false
|
||||
EXP_LOOPS=false
|
||||
|
||||
## ActivityPub Federation
|
||||
ACTIVITY_PUB=true
|
||||
AP_REMOTE_FOLLOW=true
|
||||
AP_SHAREDINBOX=true
|
||||
AP_INBOX=true
|
||||
AP_OUTBOX=true
|
||||
ATOM_FEEDS=true
|
||||
NODEINFO=true
|
||||
WEBFINGER=true
|
||||
|
||||
## S3
|
||||
FILESYSTEM_DRIVER=local
|
||||
FILESYSTEM_CLOUD=s3
|
||||
PF_ENABLE_CLOUD=false
|
||||
|
||||
## Horizon
|
||||
HORIZON_DARKMODE=false
|
||||
|
||||
## COSTAR - Confirm Object Sentiment Transform and Reduce
|
||||
PF_COSTAR_ENABLED=false
|
||||
|
||||
# Media
|
||||
MEDIA_EXIF_DATABASE=false
|
||||
|
||||
## Logging
|
||||
LOG_CHANNEL=stderr
|
||||
|
||||
## Image
|
||||
IMAGE_DRIVER=imagick
|
||||
|
||||
## Broadcasting
|
||||
BROADCAST_DRIVER=log # log driver for local development
|
||||
|
||||
## Cache
|
||||
CACHE_DRIVER=redis
|
||||
|
||||
## Purify
|
||||
RESTRICT_HTML_TYPES=true
|
||||
|
||||
## Queue
|
||||
QUEUE_DRIVER=redis
|
||||
|
||||
## Session
|
||||
SESSION_DRIVER=redis
|
||||
|
||||
## Trusted Proxy
|
||||
TRUST_PROXIES="*"
|
||||
|
||||
## Passport
|
||||
#PASSPORT_PRIVATE_KEY=
|
||||
#PASSPORT_PUBLIC_KEY=
|
||||
|
||||
ENABLE_CONFIG_CACHE=true
|
@@ -1,2 +0,0 @@
|
||||
docker_compose_path: "/home/administrator/docker-compose/pixelfed/"
|
||||
client_max_body_size: "512M"
|
Reference in New Issue
Block a user