1
0
Fork 0
pixelfed/docker-compose.yml

85 lines
2.0 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:
2019-04-22 02:40:32 +00:00
# Comment to use dockerhub image
build: .
image: pixelfed
2019-06-03 02:53:13 +00:00
restart: unless-stopped
2019-04-24 14:08:45 +00:00
## If you have a traefik running, uncomment this to expose Pixelfed
# labels:
# - traefik.enable=true
# - traefik.frontend.rule=Host:your.url
# - traefik.port=80
2019-04-24 14:08:45 +00:00
## If you have a standard reverse proxy, uncommit this to expose Pixelfed
# ports:
# - "127.0.0.1:8080:80"
env_file:
- ./.env
2018-05-20 13:02:29 +00:00
volumes:
2019-04-16 06:18:40 +00:00
- "app-storage:/var/www/storage"
- "app-bootstrap:/var/www/bootstrap"
networks:
- external
- internal
2019-04-24 14:26:13 +00:00
worker: # Comment this whole block if HORIZON_EMBED is true.
2019-04-22 02:40:32 +00:00
# Comment to use dockerhub image
build: .
image: pixelfed
2019-06-03 02:53:13 +00:00
restart: unless-stopped
2019-04-22 02:40:32 +00:00
env_file:
- ./.env
volumes:
- "app-storage:/var/www/storage"
- "app-bootstrap:/var/www/bootstrap"
networks:
2019-04-24 14:08:45 +00:00
- external # Required for ActivityPub
2019-04-22 02:40:32 +00:00
- internal
command: gosu www-data php artisan horizon
db:
2019-04-26 06:31:06 +00:00
image: mysql:8.0
2019-06-03 02:53:13 +00:00
restart: unless-stopped
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:
2019-04-18 14:23:47 +00:00
image: redis:5-alpine
2019-06-03 02:53:13 +00:00
restart: unless-stopped
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:
2019-04-16 06:18:40 +00:00
app-bootstrap:
networks:
internal:
internal: true
external:
driver: bridge