--- 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: image: git.solarpunk.moe/solarpunk/pixelfed:latest 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: - pixelfed-db - redis worker: image: git.solarpunk.moe/solarpunk/pixelfed:latest 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: command: gosu www-data php artisan horizon depends_on: - pixelfed-db - redis ## DB and Cache pixelfed-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: nginx: image: nginx restart: always command: /var/www/start.nginx.sh networks: httpsproxy: external: volumes: - ./contrib/docker-nginx.conf:/etc/nginx/nginx.conf - ./contrib/docker-default.conf.template:/etc/nginx/templates/default.conf.template - ./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" environment: - NGINX_PORT=80 volumes: db-data: redis-data: app-storage: app-bootstrap: networks: internal: external: mail: external: true httpsproxy: external: true