2020-03-14 19:14:26 +01:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
db:
|
|
|
|
build:
|
|
|
|
context: ./sql
|
|
|
|
ports:
|
|
|
|
- "5455:3306"
|
|
|
|
volumes:
|
2020-03-14 20:21:40 +01:00
|
|
|
- "./sql/db-data:/var/lib/mysql"
|
2020-03-14 19:14:26 +01:00
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: "Test"
|
|
|
|
|
|
|
|
webserver:
|
|
|
|
build:
|
2020-03-14 20:21:40 +01:00
|
|
|
context: ./frontend
|
2020-03-14 19:14:26 +01:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
volumes:
|
2020-03-14 20:21:40 +01:00
|
|
|
- "./frontend:/var/www/html"
|
2020-03-14 19:14:26 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
db-data:
|
|
|
|
|
|
|
|
|
|
|
|
# docker run -d -p 5455:3306 -v `pwd`/setup:/docker-entrypoint-initdb.d/ -v `pwd`/mysql-data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=Test mariadb
|
|
|
|
# docker run -d -p 80:80 --name my-apache-php-app -v `pwd`:/var/www/html php:7.0-apache
|