50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
|
version: '3'
|
||
|
|
||
|
services:
|
||
|
db:
|
||
|
container_name: ${CONTAINER_DB_NAME}
|
||
|
image: mariadb:latest
|
||
|
restart: unless-stopped
|
||
|
volumes:
|
||
|
- ${DB_PATH}:/var/lib/mysql
|
||
|
environment:
|
||
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
||
|
MYSQL_USER: ${MYSQL_USER}
|
||
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
||
|
|
||
|
php-fpm:
|
||
|
container_name: ${CONTAINER_PHP_NAME}
|
||
|
#image: php:7-fpm
|
||
|
build: docker/php
|
||
|
restart: unless-stopped
|
||
|
volumes:
|
||
|
- ${WEBROOT_PATH}:/var/www
|
||
|
links:
|
||
|
- db
|
||
|
|
||
|
nginx:
|
||
|
container_name: ${CONTAINER_NGINX_NAME}
|
||
|
image: nginx:stable
|
||
|
volumes:
|
||
|
- ${WEBROOT_PATH}:/var/www
|
||
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||
|
- ./nginx/sites/:/etc/nginx/sites-enabled
|
||
|
- ./nginx/conf.d/:/etc/nginx/conf.d
|
||
|
depends_on:
|
||
|
- php-fpm
|
||
|
ports:
|
||
|
- "${NGINX_PORT}:80"
|
||
|
links:
|
||
|
- php-fpm
|
||
|
|
||
|
environment:
|
||
|
VIRTUAL_HOST: ${VIRTUAL_HOST}
|
||
|
LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}
|
||
|
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
external:
|
||
|
name: ${NETWORK}
|