56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
|
version: '3'
|
||
|
|
||
|
services:
|
||
|
|
||
|
mariadb:
|
||
|
image: mariadb:latest
|
||
|
container_name: mariadb
|
||
|
networks:
|
||
|
- overlay
|
||
|
environment:
|
||
|
MYSQL_ROOT_PASSWORD: root
|
||
|
MYSQL_DATABASE: db1
|
||
|
MYSQL_USER: php
|
||
|
MYSQL_PASSWORD: php-password
|
||
|
# volumes:
|
||
|
# - ./virtual/usr/local/etc/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
||
|
# - ./virtual/var/log/php-fpm:/var/log/php-fpm
|
||
|
# - ./virtual/vhost:/vhost
|
||
|
expose:
|
||
|
- '3306'
|
||
|
|
||
|
php-fpm:
|
||
|
image: php:7-fpm
|
||
|
container_name: php-fpm
|
||
|
depends_on:
|
||
|
- mariadb
|
||
|
networks:
|
||
|
- overlay
|
||
|
volumes:
|
||
|
- ./virtual/usr/local/etc/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
||
|
- ./virtual/var/log/php-fpm:/var/log/php-fpm
|
||
|
- ./virtual/vhost:/vhost
|
||
|
expose:
|
||
|
- '9000'
|
||
|
links:
|
||
|
- mariadb
|
||
|
|
||
|
|
||
|
nginx:
|
||
|
image: nginx:latest
|
||
|
container_name: nginx
|
||
|
depends_on:
|
||
|
- php-fpm
|
||
|
networks:
|
||
|
- overlay
|
||
|
volumes:
|
||
|
- ./virtual/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||
|
- ./virtual/var/log/nginx/:/var/log/nginx
|
||
|
- ./virtual/vhost:/vhost
|
||
|
ports:
|
||
|
- 8080:80
|
||
|
links:
|
||
|
- php-fpm
|
||
|
|
||
|
networks:
|
||
|
overlay:
|