pixelfed/docker-compose.yml
2018-05-29 10:28:19 +02:00

60 lines
1.1 KiB
YAML

---
version: '3'
services:
nginx:
image: nginx:alpine
networks:
- internal
- external
ports:
- 3000:80
volumes:
- "php-storage:/var/www/html"
- ./contrib/nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
php:
build: .
image: pixelfed
volumes:
- "php-storage:/var/www/html"
networks:
- internal
environment:
- DB_HOST=mysql
- DB_DATABASE=pixelfed
- DB_USERNAME=${DB_USERNAME:-pixelfed}
- DB_PASSWORD=${DB_PASSWORD:-pixelfed}
- REDIS_HOST=redis
- APP_KEY=${APP_KEY:-app_key}
mysql:
image: mysql:5.7
networks:
- internal
environment:
- MYSQL_DATABASE=pixelfed
- MYSQL_USER=${DB_USERNAME:-pixelfed}
- MYSQL_PASSWORD=${DB_PASSWORD:-pixelfed}
- MYSQL_RANDOM_ROOT_PASSWORD="true"
volumes:
- "mysql-data:/var/lib/mysql"
redis:
image: redis:alpine
volumes:
- "redis-data:/data"
networks:
- internal
volumes:
redis-data:
mysql-data:
php-storage:
networks:
internal:
internal: true
external:
driver: bridge