phpvms/docker-compose.yml

59 lines
1.3 KiB
YAML
Raw Normal View History

---
version: '3'
services:
app:
build:
context: ./resources/docker/php
environment:
DB_HOST: mysql
2019-05-12 23:51:06 +08:00
REDIS_HOST: redis
volumes:
- ./:/var/www
- ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
depends_on:
- mysql
2019-05-12 23:51:06 +08:00
- redis
nginx:
2019-05-12 23:51:06 +08:00
image: nginx:1.15.12-alpine
2019-05-13 00:20:42 +08:00
command: /bin/sh -c "exec nginx -g 'daemon off;'"
volumes:
- ./:/var/www
- ./resources/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
2019-06-20 04:05:24 +08:00
depends_on:
- app
mysql:
image: mysql:5.7.26
environment:
2019-05-11 07:55:24 +08:00
MYSQL_DATABASE: phpvms
MYSQL_USER: phpvms
MYSQL_PASSWORD: phpvms
MYSQL_ROOT_PASSWORD:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- ./storage/docker/mysql:/var/lib/mysql
ports:
2019-05-11 07:55:24 +08:00
- 3306:3306
2019-05-11 08:31:11 +08:00
2019-05-12 23:51:06 +08:00
redis:
image: redis:5.0.4-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./storage/docker/redis:/data
ports:
- 6379:6379
restart: always
2019-05-12 23:51:06 +08:00
2019-05-11 08:31:11 +08:00
# Use this to tail the logs so it's just all in a single window
2019-08-02 01:12:54 +08:00
#logs:
# image: busybox
# command: tail -f -F -n 0 /var/www/storage/logs/laravel.log
# restart: always
# volumes:
# - ./storage:/var/www/storage
# depends_on:
# - app