docker-compose introduced

This commit is contained in:
Miroslav Šedivý 2019-12-24 00:33:51 +01:00
parent a561fe6dbd
commit 6c77f5b05a
2 changed files with 27 additions and 1 deletions

View file

@ -1,6 +1,6 @@
[database]
;mysql_socket = /tmp/mariadb55.sock
mysql_host = localhost
mysql_host = mariadb
mysql_port = 3306
mysql_user = root
mysql_pass = root

26
docker-compose.yml Executable file
View file

@ -0,0 +1,26 @@
version: "3"
services:
webserver:
build: ./
container_name: blog_apache
restart: on-failure
ports:
- ${HOST_MACHINE_UNSECURE_HOST_PORT-3001}:80
- ${HOST_MACHINE_SECURE_HOST_PORT-3002}:443
volumes:
- ${IMAGES-./i}:/var/www/html/i
- ${THUMBS-./t}:/var/www/html/t
- ${DATA-./data}:/var/www/html/data
- ${CONFIG-./config.ini}:/var/www/html/custom.ini
mariadb:
image: mariadb:10.1
environment:
MYSQL_DATABASE: blog
MYSQL_ROOT_PASSWORD: root
restart: on-failure
volumes:
- mariadb:/var/lib/mysql
- ./app/db:/docker-entrypoint-initdb.d:ro
volumes:
mariadb: