tp-docker-eisti/docker-compose.yml

56 lines
1.1 KiB
YAML
Raw Normal View History

version: '3'
services:
mariadb:
image: mariadb:latest
container_name: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: vhost
MYSQL_USER: php
MYSQL_PASSWORD: 4JB1dtbrIC8pT935
volumes:
- ./virtual/var/lib/mysql:/var/lib/mysql
networks:
- privnet
expose:
- '3306'
php-fpm:
image: php:7-fpm
container_name: php-fpm
depends_on:
- mariadbs
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
networks:
- privnet
expose:
- '9000'
links:
- mariadb
nginx:
image: nginx:latest
container_name: nginx
depends_on:
- php-fpm
volumes:
- ./virtual/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./virtual/var/log/nginx/:/var/log/nginx
- ./virtual/vhost:/vhost
networks:
- privnet
ports:
- 8080:80
links:
- php-fpm
networks:
privnet:
name: privnet
driver: