Closed kevinveenbirkenbach closed 5 months ago
Further Information: https://mastodon.veen.world/@kevinveenbirkenbach/112491935493850455
Pixelfed was setup with this ansible role, which created the following nginx and docker files:
docker-compose.yml:
services:
# This template needs to be included in docker-compose.yml, which depend on a mariadb database
# This template needs to be included in docker-compose.yml, which depend on redis
redis:
image: redis:alpine
container_name: pixelfed-redis
restart: unless-stopped
logging:
driver: journald
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
networks:
- default
application:
image: zknt/pixelfed
restart: unless-stopped
logging:
driver: journald
env_file:
- ./env
volumes:
- "data:/var/www/storage"
- "bootstrap:/var/www/bootstrap"
- "./env:/var/www/.env"
ports:
- "8010:80"
# This template needs to be included in docker-compose.yml containers, which depend on a database, redis and optional additional volumes
depends_on:
redis:
condition: service_healthy
# This template needs to be included in docker-compose.yml containers
networks:
central_mariadb:
default:
worker:
image: zknt/pixelfed
restart: unless-stopped
logging:
driver: journald
env_file:
- ./env
volumes:
- "data:/var/www/storage"
- "bootstrap:/var/www/bootstrap"
- "./env:/var/www/.env"
entrypoint: /worker-entrypoint.sh
healthcheck:
test: php artisan horizon:status | grep running
interval: 60s
timeout: 5s
retries: 1
# This template needs to be included in docker-compose.yml containers, which depend on a database, redis and optional additional volumes
depends_on:
redis:
condition: service_healthy
application:
condition: service_started
# This template needs to be included in docker-compose.yml containers
networks:
central_mariadb:
default:
# This template needs to be included in docker-compose.yml which contain a database and additional volumes
volumes:
redis:
data:
bootstrap:
# This template needs to be included in docker-compose.yml
networks:
central_mariadb:
external: true
default:
env
## Crypto
APP_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
## General Settings
APP_NAME="Pictures on veen.world"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://picture.veen.world
APP_DOMAIN="picture.veen.world"
ADMIN_DOMAIN="picture.veen.world"
SESSION_DOMAIN="picture.veen.world"
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=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MAIL_PORT=587
MAIL_FROM_ADDRESS=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MAIL_FROM_NAME="Pixelfed"
MAIL_USERNAME=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MAIL_PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MAIL_ENCRYPTION=tls
## Databases (MySQL)
DB_CONNECTION=mysql
DB_DATABASE=pixelfed
DB_HOST=central-mariadb
DB_PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DB_PORT=3306
DB_USERNAME=pixelfed
## 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
cat /etc/nginx/conf.d/servers/picture.veen.world.conf
server
{
server_name picture.veen.world;
# Include Matomo Tracking Code
# Deactivate CSP header
more_set_headers "Content-Security-Policy: ";
# sub filters to integrate matomo tracking code in nginx websites
sub_filter '</head>' '<script>var _paq = window._paq = window._paq || [];_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);_paq.push(["setCookieDomain", "*.veen.world"]);_paq.push(["setDomains", ["*.veen.world"]]);_paq.push(["enableCrossDomainLinking"]);_paq.push(["trackPageView"]);_paq.push(["trackAllContentImpressions"]);_paq.push(["enableLinkTracking"]);(function() { var u="//matomo.veen.world/"; _paq.push(["setTrackerUrl", u+"matomo.php"]); _paq.push(["setSiteId", "1"]); var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.async=true; g.src=u+"matomo.js"; s.parentNode.insertBefore(g,s);})();</script></head>';
sub_filter '</body>' '<noscript><p><img src="//matomo.veen.world/matomo.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript></body>';
sub_filter_once off;
# Additional Domain Specific Configuration
client_max_body_size 512M;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets on;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
ssl_certificate /etc/letsencrypt/live/picture.veen.world/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/picture.veen.world/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/picture.veen.world/chain.pem;
location /
{
proxy_pass http://127.0.0.1:8010/;
# headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Accept-Encoding "";
# WebSocket specific header
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# deactivate buffering
proxy_buffering off;
proxy_request_buffering off;
# timeouts
proxy_connect_timeout 1s;
proxy_send_timeout 900s;
proxy_read_timeout 900s;
send_timeout 900s;
}
}
/etc/nginx/nginx.conf
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
worker_processes auto;
events
{
worker_connections 1024;
}
http
{
include mime.types;
default_type text/html;
# caching
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:20m max_size=20g inactive=14d use_temp_path=off;
# logs
access_log syslog:server=unix:/dev/log;
error_log syslog:server=unix:/dev/log;
sendfile on;
keepalive_timeout 65;
# gzip
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)"; # Disable for Internetexplorer 6
gzip_comp_level 4;
gzip_min_length 256;
gzip_types application/atom+xml application/javascript application/xml+rss application/x-javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy text/javascript text/xml;
types_hash_max_size 4096;
include /etc/nginx/conf.d/upstreams/*.conf;
include /etc/nginx/conf.d/maps/*.conf;
include /etc/nginx/conf.d/servers/*.conf;
}
Solved by executing
php artisan config:cache
See: https://chatgpt.com/share/1378c464-519f-4871-9400-ca5d822421a0
It is not possible to follow my pixelfed account from my mastodon instance
When I try to follow the account the "Follow" button
just chances to "Cancel Follow"
and no new posts are displayed.