mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
89 lines
1.8 KiB
YAML
89 lines
1.8 KiB
YAML
---
|
|
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:
|
|
## App and Worker
|
|
app:
|
|
# Comment to use dockerhub image
|
|
build:
|
|
context: .
|
|
dockerfile: contrib/docker/Dockerfile.apache
|
|
image: pixelfed
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.docker
|
|
volumes:
|
|
- app-storage:/var/www/storage
|
|
- app-bootstrap:/var/www/bootstrap
|
|
- "./.env.docker:/var/www/.env"
|
|
networks:
|
|
- external
|
|
- internal
|
|
ports:
|
|
- "8080:80"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: contrib/docker/Dockerfile.apache
|
|
image: pixelfed
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.docker
|
|
volumes:
|
|
- app-storage:/var/www/storage
|
|
- app-bootstrap:/var/www/bootstrap
|
|
networks:
|
|
- external
|
|
- internal
|
|
command: gosu www-data php artisan horizon
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
## DB and Cache
|
|
db:
|
|
image: mysql:8.0
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
env_file:
|
|
- .env.docker
|
|
volumes:
|
|
- "db-data:/var/lib/mysql"
|
|
|
|
redis:
|
|
image: redis:5-alpine
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.docker
|
|
volumes:
|
|
- "redis-data:/data"
|
|
networks:
|
|
- internal
|
|
|
|
volumes:
|
|
db-data:
|
|
redis-data:
|
|
app-storage:
|
|
app-bootstrap:
|
|
|
|
networks:
|
|
internal:
|
|
internal: true
|
|
external:
|
|
driver: bridge
|