|
@@ -1,40 +1,56 @@
|
|
---
|
|
---
|
|
version: '3'
|
|
version: '3'
|
|
|
|
+
|
|
|
|
+# In order to set configuration, please use a .env file in
|
|
|
|
+# your compose project directory (the same directory as your
|
|
|
|
+# docker-compose.yml), and set database options, application
|
|
|
|
+# name, key, and other settings there.
|
|
|
|
+# A list of available settings is available in .env.example
|
|
|
|
+#
|
|
|
|
+# The services should scale properly across a swarm cluster
|
|
|
|
+# if the volumes are properly shared between cluster members.
|
|
|
|
+
|
|
services:
|
|
services:
|
|
|
|
|
|
- pixelfed:
|
|
|
|
- build: .
|
|
|
|
|
|
+ app:
|
|
|
|
+ # Uncomment to build a local copy of the image
|
|
|
|
+ # build: .
|
|
image: pixelfed
|
|
image: pixelfed
|
|
|
|
+ # If you have a traefik running, uncomment this to expose Pixelfed
|
|
|
|
+ # labels:
|
|
|
|
+ # - traefik.enable=true
|
|
|
|
+ # - traefik.frontend.rule=Host:your.url
|
|
|
|
+ # - traefik.port=80
|
|
|
|
+ env_file:
|
|
|
|
+ - ./.env
|
|
volumes:
|
|
volumes:
|
|
- - "php-storage:/var/www/html"
|
|
|
|
|
|
+ - "app-storage:/var/www/storage"
|
|
networks:
|
|
networks:
|
|
- external
|
|
- external
|
|
- internal
|
|
- internal
|
|
- environment:
|
|
|
|
- # The full list of available variables is documented in docker/env
|
|
|
|
- - DB_HOST=mysql
|
|
|
|
- - DB_DATABASE=pixelfed
|
|
|
|
- - DB_USERNAME=${DB_USERNAME:-pixelfed}
|
|
|
|
- - DB_PASSWORD=${DB_PASSWORD:-pixelfed}
|
|
|
|
- - REDIS_HOST=redis
|
|
|
|
- - APP_KEY=SetYourAppKeyHere
|
|
|
|
- - APP_NAME=Pixelfed
|
|
|
|
- - APP_URL=https://your.url
|
|
|
|
- - MAIL_HOST=mail.host
|
|
|
|
- - MAIL_FROM_ADDRESS=noreply@your.url
|
|
|
|
- - MAIL_FROM_NAME=Pixelfed
|
|
|
|
|
|
|
|
- mysql:
|
|
|
|
|
|
+ # Uncomment if you set HORIZON_EMBED to false and wish to run a local worker
|
|
|
|
+ # worker:
|
|
|
|
+ # image: pixelfed
|
|
|
|
+ # env_file:
|
|
|
|
+ # - ./.env
|
|
|
|
+ # volumes:
|
|
|
|
+ # - "app-storage:/var/www/storage"
|
|
|
|
+ # networks:
|
|
|
|
+ # - internal
|
|
|
|
+ # command: php artisan horizon
|
|
|
|
+
|
|
|
|
+ db:
|
|
image: mysql:5.7
|
|
image: mysql:5.7
|
|
networks:
|
|
networks:
|
|
- internal
|
|
- internal
|
|
environment:
|
|
environment:
|
|
- MYSQL_DATABASE=pixelfed
|
|
- MYSQL_DATABASE=pixelfed
|
|
- - MYSQL_USER=${DB_USERNAME:-pixelfed}
|
|
|
|
- - MYSQL_PASSWORD=${DB_PASSWORD:-pixelfed}
|
|
|
|
- - MYSQL_RANDOM_ROOT_PASSWORD="true"
|
|
|
|
|
|
+ - MYSQL_USER=${DB_USERNAME}
|
|
|
|
+ - MYSQL_PASSWORD=${DB_PASSWORD}
|
|
|
|
+ - MYSQL_RANDOM_ROOT_PASSWORD=true
|
|
volumes:
|
|
volumes:
|
|
- - "mysql-data:/var/lib/mysql"
|
|
|
|
|
|
+ - "db-data:/var/lib/mysql"
|
|
|
|
|
|
redis:
|
|
redis:
|
|
image: redis:alpine
|
|
image: redis:alpine
|
|
@@ -43,10 +59,11 @@ services:
|
|
networks:
|
|
networks:
|
|
- internal
|
|
- internal
|
|
|
|
|
|
|
|
+# Adjust your volume data in order to store data where you wish
|
|
volumes:
|
|
volumes:
|
|
redis-data:
|
|
redis-data:
|
|
- mysql-data:
|
|
|
|
- php-storage:
|
|
|
|
|
|
+ db-data:
|
|
|
|
+ app-storage:
|
|
|
|
|
|
networks:
|
|
networks:
|
|
internal:
|
|
internal:
|