pixelfed/docker-compose.yml
Angristan e170830aca
Provide at least a major version of redis for the docker image
Considering Redis 5 is currently in RC, it would be safer to provide at least a major version of Redis, even if there is not compatibility issue yet.
2018-07-22 19:15:49 +02:00

65 lines
1.2 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}
env_file:
- ./.env
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"
env_file:
- ./.env
volumes:
- "mysql-data:/var/lib/mysql"
redis:
image: redis:4-alpine
volumes:
- "redis-data:/data"
networks:
- internal
volumes:
redis-data:
mysql-data:
php-storage:
networks:
internal:
internal: true
external:
driver: bridge