shopping-list/docker-compose.yml

45 lines
927 B
YAML
Raw Normal View History

2022-02-03 21:35:18 +01:00
version: "3.2"
services:
php:
build: './php/'
env_file:
- .env
networks:
- backend
volumes:
- ./public_html/:/var/www/html/
apache:
build: './apache/'
depends_on:
- php
- mysql
networks:
- frontend
- backend
ports:
- "8080:80"
volumes:
- ./public_html/:/var/www/html/
mysql:
build: "./mysql/"
networks:
- backend
command: [
"--default-authentication-plugin=mysql_native_password",
"--character-set-server=utf8",
"--collation-server=utf8_general_ci"
]
environment:
- MYSQL_DATABASE=${MYSQL_DATABASENAME}
- MYSQL_USER=${MYSQL_DATABASEUSER}
- MYSQL_PASSWORD=${MYSQL_DATABASEPASSWORD}
- MYSQL_RANDOM_ROOT_PASSWORD=true
- TZ=Europe/Berlin
- LANG=C.UTF-8
volumes:
- mysql-data:/var/lib/mysql
networks:
frontend:
backend:
volumes:
mysql-data: