mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
34
roles/web-app-pixelfed/templates/docker-compose.yml.j2
Normal file
34
roles/web-app-pixelfed/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,34 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
application:
|
||||
image: "{{ applications[application_id].images.pixelfed }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/www/storage"
|
||||
- "./env:/var/www/.env"
|
||||
ports:
|
||||
- "{{ports.localhost.http[application_id]}}:80"
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
worker:
|
||||
image: "{{ applications[application_id].images.pixelfed }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/www/storage"
|
||||
- "./env:/var/www/.env"
|
||||
entrypoint: /worker-entrypoint.sh
|
||||
healthcheck:
|
||||
test: php artisan horizon:status | grep running
|
||||
interval: 60s
|
||||
timeout: 5s
|
||||
retries: 1
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
||||
application:
|
||||
condition: service_started
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
redis:
|
||||
data:
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
154
roles/web-app-pixelfed/templates/env.j2
Normal file
154
roles/web-app-pixelfed/templates/env.j2
Normal file
@@ -0,0 +1,154 @@
|
||||
## Crypto
|
||||
APP_KEY={{applications[application_id].credentials.app_key}}
|
||||
|
||||
## General Settings
|
||||
APP_NAME="{{applications.pixelfed.titel}}"
|
||||
APP_ENV={{ CYMAIS_ENVIRONMENT | lower }}
|
||||
APP_DEBUG={{enable_debug | string | lower }}
|
||||
APP_URL={{ domains | get_url(application_id, web_protocol) }}
|
||||
APP_DOMAIN="{{domains | get_domain(application_id)}}"
|
||||
ADMIN_DOMAIN="{{domains | get_domain(application_id)}}"
|
||||
SESSION_DOMAIN="{{domains | get_domain(application_id)}}"
|
||||
|
||||
OPEN_REGISTRATION=false
|
||||
ENFORCE_EMAIL_VERIFICATION=false
|
||||
PF_MAX_USERS=1000
|
||||
OAUTH_ENABLED=true
|
||||
|
||||
APP_TIMEZONE={{ HOST_TIMEZONE }}
|
||||
APP_LOCALE={{ HOST_LL }}
|
||||
|
||||
## 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="{{ users['no-reply'].email }}"
|
||||
MAIL_FROM_NAME={{ service_provider.company.titel }} - Pixelfed
|
||||
MAIL_USERNAME={{ users['no-reply'].email }}
|
||||
MAIL_PASSWORD={{ users['no-reply'].mailu_token }}
|
||||
# Not sure if the following is correct
|
||||
# Checkout: https://github.com/pixelfed/pixelfed/blob/dev/.env.docker
|
||||
MAIL_ENCRYPTION={{ 'ssl' if system_email.start_tls else 'tls' }}
|
||||
|
||||
## Databases (MySQL)
|
||||
DB_CONNECTION=mysql
|
||||
DB_DATABASE={{database_name}}
|
||||
DB_HOST={{database_host}}
|
||||
DB_PASSWORD="{{database_password}}"
|
||||
DB_PORT="{{database_port}}"
|
||||
DB_USERNAME={{database_username}}
|
||||
|
||||
## 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
|
||||
|
||||
{% if applications | is_feature_enabled('oidc',application_id) %}
|
||||
|
||||
###################################
|
||||
# OpenID Connect settings
|
||||
###################################
|
||||
# @see https://github.com/pixelfed/pixelfed/commit/b3c27815788e4b47e7eb3fca727d817512cf26c2#diff-66e408190a301e81b5f1c079463487c54a6452c4944dc5ae80770f50101283ff
|
||||
|
||||
PF_OIDC_ENABLED={{ applications | is_feature_enabled('oidc',application_id) | string | lower }}
|
||||
PF_OIDC_AUTHORIZE_URL="{{oidc.client.authorize_url}}"
|
||||
PF_OIDC_TOKEN_URL="{{oidc.client.token_url}}"
|
||||
PF_OIDC_PROFILE_URL="{{ oidc.client.user_info_url }}"
|
||||
PF_OIDC_LOGOUT_URL="{{oidc.client.logout_url}}"
|
||||
PF_OIDC_USERNAME_FIELD="{{oidc.attributes.username}}"
|
||||
PF_OIDC_FIELD_ID="{{oidc.attributes.username}}"
|
||||
PF_OIDC_CLIENT_SECRET={{oidc.client.secret}}
|
||||
PF_OIDC_CLIENT_ID={{oidc.client.id}}
|
||||
PF_OIDC_SCOPES="openid profile email"
|
||||
|
||||
{% endif %}
|
Reference in New Issue
Block a user