pixelfed/docker-compose.yml

61 lines
1.1 KiB
YAML
Raw Normal View History

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