pixelfed/docker-compose.yml

112 lines
2.6 KiB
YAML
Raw Normal View History

2022-05-11 04:14:37 +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.
services:
## App and Worker
pixelfed-app:
2023-09-27 06:14:13 +00:00
image: git.solarpunk.moe/solarpunk/pixelfed:latest
2022-05-11 04:14:37 +00:00
build:
context: .
dockerfile: contrib/docker/Dockerfile.fpm
restart: unless-stopped
env_file:
- .env.docker
volumes:
- app-storage:/var/www/storage
- app-bootstrap:/var/www/bootstrap
networks:
internal:
external:
mail:
depends_on:
2023-09-27 06:14:13 +00:00
- pixelfed-db
2022-05-11 04:14:37 +00:00
- redis
worker:
2023-09-27 06:14:13 +00:00
image: git.solarpunk.moe/solarpunk/pixelfed:latest
2022-05-11 04:14:37 +00:00
build:
context: .
dockerfile: contrib/docker/Dockerfile.fpm
restart: unless-stopped
env_file:
- .env.docker
volumes:
- app-storage:/var/www/storage
- app-bootstrap:/var/www/bootstrap
networks:
internal:
mail:
2022-05-11 04:14:37 +00:00
command: gosu www-data php artisan horizon
depends_on:
2023-09-27 06:14:13 +00:00
- pixelfed-db
2022-05-11 04:14:37 +00:00
- redis
## DB and Cache
2023-09-27 06:14:13 +00:00
pixelfed-db:
2022-05-11 04:14:37 +00:00
image: mysql:8.0
restart: unless-stopped
networks:
internal:
2022-05-11 04:14:37 +00:00
command: --default-authentication-plugin=mysql_native_password
env_file:
- .env.docker
volumes:
- "db-data:/var/lib/mysql"
2022-05-11 04:14:37 +00:00
redis:
image: redis:5-alpine
restart: unless-stopped
env_file:
- .env.docker
volumes:
- "redis-data:/data"
networks:
internal:
2022-05-11 04:14:37 +00:00
nginx:
image: nginx
restart: always
command: /var/www/start.nginx.sh
networks:
httpsproxy:
external:
2022-05-11 04:14:37 +00:00
volumes:
2023-09-27 06:14:13 +00:00
- ./contrib/docker-nginx.conf:/etc/nginx/nginx.conf
- ./contrib/docker-default.conf.template:/etc/nginx/templates/default.conf.template
2022-05-11 04:14:37 +00:00
- ./contrib/docker/start.nginx.sh:/var/www/start.nginx.sh
- ./public:/var/www/public
- app-storage:/var/www/storage
labels:
- "traefik.enable=true"
- "traefik.http.services.pixelfed.loadbalancer.server.port=80"
- "traefik.http.routers.pixelfed.rule=Host(`pix.solarpunk.moe`)"
- "traefik.http.routers.pixelfed.tls.certresolver=leresolver"
- "traefik.http.routers.pixelfed.entrypoints=websecure"
2022-05-11 04:14:37 +00:00
environment:
- NGINX_PORT=80
volumes:
db-data:
redis-data:
app-storage:
app-bootstrap:
networks:
internal:
external:
mail:
external: true
httpsproxy:
external: true