1
0
Fork 0
pixelfed/docker-compose.yml

106 lines
3.3 KiB
YAML
Raw Normal View History

2018-05-20 13:02:29 +00:00
---
2024-01-06 14:19:36 +00:00
version: "3"
2024-01-06 14:19:36 +00:00
###############################################################
# Please see docker/README.md for usage information
###############################################################
2018-05-20 13:02:29 +00:00
services:
2024-01-06 16:43:48 +00:00
# HTTP/HTTPS proxy
#
# See: https://github.com/nginx-proxy/nginx-proxy/tree/main/docs
proxy:
image: nginxproxy/nginx-proxy:1.4
container_name: "${APP_DOMAIN}-proxy"
#restart: unless-stopped
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "${DOCKER_CONFIG_ROOT}/proxy/certs:/etc/nginx/certs"
- "${DOCKER_CONFIG_ROOT}/proxy/conf.d:/etc/nginx/conf.d"
- "${DOCKER_CONFIG_ROOT}/proxy/html:/usr/share/nginx/html"
- "${DOCKER_CONFIG_ROOT}/proxy/vhost.d:/etc/nginx/vhost.d"
ports:
- "${DOCKER_PROXY_PORT_EXTERNAL_HTTP}:80"
- "${DOCKER_PROXY_PORT_EXTERNAL_HTTPS}:443"
# Proxy companion for managing letsencrypt SSL certificates
#
# See: https://github.com/nginx-proxy/acme-companion/tree/main/docs
proxy-acme:
image: nginxproxy/acme-companion
container_name: "${APP_DOMAIN}-proxy-acme"
#restart: unless-stopped
environment:
DEFAULT_EMAIL: "${LETSENCRYPT_EMAIL}"
LETSENCRYPT_TEST: "${LETSENCRYPT_TEST}"
NGINX_PROXY_CONTAINER: "${APP_DOMAIN}-proxy"
depends_on:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- "${DOCKER_CONFIG_ROOT}/proxy/certs:/etc/nginx/certs"
- "${DOCKER_CONFIG_ROOT}/proxy/conf.d:/etc/nginx/conf.d"
- "${DOCKER_CONFIG_ROOT}/proxy/html:/usr/share/nginx/html"
- "${DOCKER_CONFIG_ROOT}/proxy/vhost.d:/etc/nginx/vhost.d"
2024-01-06 14:19:36 +00:00
web:
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
# build:
# target: apache-runtime
2019-06-03 02:53:13 +00:00
restart: unless-stopped
2018-05-20 13:02:29 +00:00
volumes:
2024-01-06 14:19:36 +00:00
- "./.env:/var/www/.env"
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
2024-01-06 16:43:48 +00:00
environment:
LETSENCRYPT_HOST: "${APP_DOMAIN},*.${APP_DOMAIN}"
VIRTUAL_HOST: "${APP_DOMAIN},*.${APP_DOMAIN}"
VIRTUAL_PORT: "80"
labels:
com.github.nginx-proxy.nginx-proxy.keepalive: 30
com.github.nginx-proxy.nginx-proxy.http2.enable: true
com.github.nginx-proxy.nginx-proxy.http3.enable: true
# ports:
# - "${DOCKER_WEB_HTTP_PORT_EXTERNAL}:80"
# - "${DOCKER_WEB_HTTPS_PORT_EXTERNAL}:443"
2020-04-11 15:48:02 +00:00
depends_on:
2020-04-11 15:52:05 +00:00
- db
2020-04-11 15:48:02 +00:00
- redis
2020-04-11 15:48:02 +00:00
worker:
2024-01-06 14:19:36 +00:00
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
# build:
# target: apache-runtime
command: gosu www-data php artisan horizon
2019-06-03 02:53:13 +00:00
restart: unless-stopped
2019-04-22 02:40:32 +00:00
volumes:
2024-01-06 14:19:36 +00:00
- "./.env:/var/www/.env"
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
2020-04-11 15:48:02 +00:00
depends_on:
2020-04-11 15:52:05 +00:00
- db
2020-04-11 15:48:02 +00:00
- redis
db:
2024-01-06 14:19:36 +00:00
image: mariadb:11.2
command: --default-authentication-plugin=mysql_native_password
2024-01-06 14:19:36 +00:00
restart: unless-stopped
2018-05-20 13:02:29 +00:00
volumes:
2024-01-06 14:19:36 +00:00
- "${DOCKER_DATA_ROOT}/db:/var/lib/mysql"
ports:
- "${DOCKER_DB_PORT_EXTERNAL}:3306"
2018-05-20 13:02:29 +00:00
redis:
2024-01-06 14:19:36 +00:00
image: redis:7
2019-06-03 02:53:13 +00:00
restart: unless-stopped
2018-05-20 13:02:29 +00:00
volumes:
2024-01-06 14:19:36 +00:00
- "${DOCKER_CONFIG_ROOT}/redis:/etc/redis"
- "${DOCKER_DATA_ROOT}/redis:/data"
ports:
- "${DOCKER_REDIS_PORT_EXTERNAL}:6399"
healthcheck:
interval: 10s
timeout: 5s
retries: 2
test: ["CMD", "redis-cli", "-p", "6399", "ping"]