mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
optimized mastodon and pixelfed implementation
This commit is contained in:
parent
d43b98233f
commit
1a6f802900
@ -17,5 +17,8 @@
|
|||||||
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"
|
||||||
|
force: no
|
||||||
notify: recreate mastodon
|
notify: recreate mastodon
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
# role docker-pixelfed
|
# role docker-pixelfed
|
||||||
|
## hard cleanup
|
||||||
|
```bash
|
||||||
|
docker-compose down
|
||||||
|
docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis_data
|
||||||
|
```
|
||||||
|
|
||||||
## further information
|
## further information
|
||||||
- https://hub.docker.com/r/zknt/pixelfed
|
- https://hub.docker.com/r/zknt/pixelfed
|
||||||
|
@ -1,22 +1,25 @@
|
|||||||
---
|
---
|
||||||
- name: recieve pixelfed certificates
|
- name: recieve {{domain}} certificate
|
||||||
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{item}}
|
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
||||||
loop: "{{domains}}"
|
|
||||||
|
|
||||||
- name: configure pixelfed nginx configurations
|
- name: configure {{domain}}.conf
|
||||||
vars:
|
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
||||||
client_max_body_size: "2M"
|
|
||||||
domain: "{{item}}"
|
|
||||||
template: src=roles/native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
|
|
||||||
loop: "{{domains}}"
|
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
- name: "create /home/administrator/docker-compose/pixelfed/"
|
- name: "create {{docker_compose_path}}"
|
||||||
file:
|
file:
|
||||||
path: "/home/administrator/docker-compose/pixelfed/"
|
path: "{{docker_compose_path}}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: add docker-compose.yml
|
||||||
template: src=docker-compose.yml.j2 dest=/home/administrator/docker-compose/pixelfed/docker-compose.yml
|
template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml
|
||||||
notify: recreate pixelfed
|
notify: recreate pixelfed
|
||||||
|
|
||||||
|
- name: add env
|
||||||
|
template:
|
||||||
|
src: env.j2
|
||||||
|
dest: "{{docker_compose_path}}env"
|
||||||
|
mode: '770'
|
||||||
|
force: no
|
||||||
|
notify: recreate pixelfed
|
@ -30,7 +30,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
- redis
|
- redis
|
||||||
- app
|
- application
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: php artisan horizon:status | grep running
|
test: php artisan horizon:status | grep running
|
||||||
interval: 60s
|
interval: 60s
|
||||||
@ -56,7 +56,7 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
volumes:
|
volumes:
|
||||||
- redis:/data
|
- redis_data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 1s
|
interval: 1s
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
## Crypto
|
## Crypto
|
||||||
APP_KEY=
|
APP_KEY={{pixelfed_app_key}}
|
||||||
|
|
||||||
## General Settings
|
## General Settings
|
||||||
APP_NAME="Pixelfed Prod"
|
APP_NAME="Pixelfed on Veen.World"
|
||||||
APP_ENV=production
|
APP_ENV=production
|
||||||
APP_DEBUG=false
|
APP_DEBUG=false
|
||||||
APP_URL=https://{{domain}}
|
APP_URL=https://{{domain}}
|
||||||
@ -56,16 +56,12 @@ MAIL_ENCRYPTION=tls
|
|||||||
|
|
||||||
## Databases (MySQL)
|
## Databases (MySQL)
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_DATABASE=pixelfed_prod
|
DB_DATABASE=pixelfed
|
||||||
DB_HOST=db
|
DB_HOST=database
|
||||||
DB_PASSWORD=pixelfed_db_pass
|
DB_PASSWORD="{{pixelfed_database_password}}"
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_USERNAME=pixelfed
|
DB_USERNAME=pixelfed
|
||||||
# pass the same values to the db itself
|
# pass the same values to the db itself
|
||||||
MYSQL_DATABASE=pixelfed_prod
|
|
||||||
MYSQL_PASSWORD=pixelfed_db_pass
|
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD=true
|
|
||||||
MYSQL_USER=pixelfed
|
|
||||||
MYSQL_DATABASE="pixelfed"
|
MYSQL_DATABASE="pixelfed"
|
||||||
MYSQL_USER="pixelfed"
|
MYSQL_USER="pixelfed"
|
||||||
MYSQL_PASSWORD="{{pixelfed_database_password}}"
|
MYSQL_PASSWORD="{{pixelfed_database_password}}"
|
||||||
@ -75,7 +71,7 @@ MYSQL_ROOT_PASSWORD="{{pixelfed_database_password}}"
|
|||||||
REDIS_CLIENT=phpredis
|
REDIS_CLIENT=phpredis
|
||||||
REDIS_SCHEME=tcp
|
REDIS_SCHEME=tcp
|
||||||
REDIS_HOST=redis
|
REDIS_HOST=redis
|
||||||
REDIS_PASSWORD=redis_password
|
#REDIS_PASSWORD=
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
REDIS_DATABASE=0
|
REDIS_DATABASE=0
|
||||||
|
|
||||||
@ -136,4 +132,6 @@ TRUST_PROXIES="*"
|
|||||||
|
|
||||||
## Passport
|
## Passport
|
||||||
#PASSPORT_PRIVATE_KEY=
|
#PASSPORT_PRIVATE_KEY=
|
||||||
#PASSPORT_PUBLIC_KEY=
|
#PASSPORT_PUBLIC_KEY=
|
||||||
|
|
||||||
|
ENABLE_CONFIG_CACHE=true
|
1
roles/docker-pixelfed/vars/main.yml
Normal file
1
roles/docker-pixelfed/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
docker_compose_path: "/home/administrator/docker-compose/pixelfed/"
|
Loading…
Reference in New Issue
Block a user