2019-05-11 07:40:07 +08:00
|
|
|
---
|
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
app:
|
2020-02-09 02:29:34 +08:00
|
|
|
# For your own docker-compose, use `image: phpvms:latest` instead of the build/context block
|
2019-05-11 07:40:07 +08:00
|
|
|
build:
|
2020-02-09 02:29:34 +08:00
|
|
|
context: .
|
2019-05-11 07:40:07 +08:00
|
|
|
environment:
|
|
|
|
DB_HOST: mysql
|
2019-05-12 23:51:06 +08:00
|
|
|
REDIS_HOST: redis
|
2019-05-11 07:40:07 +08:00
|
|
|
volumes:
|
|
|
|
- ./:/var/www
|
2019-06-20 00:41:42 +08:00
|
|
|
- ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
2019-05-11 07:40:07 +08:00
|
|
|
depends_on:
|
|
|
|
- mysql
|
2019-05-12 23:51:06 +08:00
|
|
|
- redis
|
2019-05-11 07:40:07 +08:00
|
|
|
|
|
|
|
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;'"
|
2019-05-11 07:40:07 +08:00
|
|
|
volumes:
|
|
|
|
- ./:/var/www
|
2019-06-20 00:41:42 +08:00
|
|
|
- ./resources/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
|
2019-05-11 07:40:07 +08:00
|
|
|
ports:
|
|
|
|
- 80:80
|
2019-06-20 04:05:24 +08:00
|
|
|
depends_on:
|
|
|
|
- app
|
2019-05-11 07:40:07 +08:00
|
|
|
|
|
|
|
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'
|
2019-05-11 07:40:07 +08:00
|
|
|
volumes:
|
2019-06-20 01:02:06 +08:00
|
|
|
- ./storage/docker/mysql:/var/lib/mysql
|
2019-05-11 07:40:07 +08:00
|
|
|
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
|
2019-06-20 01:02:06 +08:00
|
|
|
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
|