pixelfed/docker-compose.yml

73 lines
1.6 KiB
YAML
Raw Normal View History

2018-05-20 13:02:29 +00:00
---
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.
2018-05-20 13:02:29 +00:00
services:
app:
# Uncomment to build a local copy of the image
# build: .
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
2018-05-20 13:02:29 +00:00
volumes:
- "app-storage:/var/www/storage"
networks:
- external
- internal
# 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:
2018-05-20 13:02:29 +00:00
image: mysql:5.7
networks:
- internal
2018-05-20 13:02:29 +00:00
environment:
- MYSQL_DATABASE=pixelfed
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=true
2018-05-20 13:02:29 +00:00
volumes:
- "db-data:/var/lib/mysql"
2018-05-20 13:02:29 +00:00
redis:
image: redis:4-alpine
2018-05-20 13:02:29 +00:00
volumes:
- "redis-data:/data"
networks:
- internal
# Adjust your volume data in order to store data where you wish
volumes:
redis-data:
db-data:
app-storage:
networks:
internal:
internal: true
external:
driver: bridge