add docker containers with mysql server and PHP 8.0 and 8.1

(cherry picked from commit dd5e4f63ce)
This commit is contained in:
Max Pozdeev 2022-01-10 18:11:44 +03:00
parent 010a863713
commit 3b33781e16
7 changed files with 87 additions and 0 deletions

1
docker/dev/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*/db_data

View file

@ -0,0 +1,4 @@
FROM mariadb:10.5
COPY my.cnf /etc/mysql/conf.d/

View file

@ -0,0 +1,4 @@
[mysqld]
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4
innodb_log_file_size=10M

View file

@ -0,0 +1 @@
PLATFORM_NAME=mtt-dev-php80-apache-mariadb105

View file

@ -0,0 +1,38 @@
version: "3.9"
networks:
network:
name: "${PLATFORM_NAME}-network"
services:
web:
build:
context: ../mtt-php80-apache/
dockerfile: Dockerfile-web
image: mytinytodo-dev:php8.0-apache
container_name: ${PLATFORM_NAME}-web
ports:
- "8080:80"
volumes:
- ../../../src:/var/www/html
depends_on:
- db
networks:
- network
db:
build:
context: ../_mariadb105
dockerfile: Dockerfile-db
image: mytinytodo-dev:mariadb10.5
container_name: ${PLATFORM_NAME}-db
#restart: always
environment:
MARIADB_ROOT_PASSWORD: JustForDev
MARIADB_USER: mtt
MARIADB_PASSWORD: mtt
MARIADB_DATABASE: mytinytodo
volumes:
- ../_mariadb105/db_data:/var/lib/mysql
networks:
- network

View file

@ -0,0 +1 @@
PLATFORM_NAME=mtt-dev-php81-apache-mariadb105

View file

@ -0,0 +1,38 @@
version: "3.9"
networks:
network:
name: "${PLATFORM_NAME}-network"
services:
web:
build:
context: ../mtt-php81-apache/
dockerfile: Dockerfile-web
image: mytinytodo-dev:php8.1-apache
container_name: ${PLATFORM_NAME}-web
ports:
- "8080:80"
volumes:
- ../../../src:/var/www/html
depends_on:
- db
networks:
- network
db:
build:
context: ../_mariadb105
dockerfile: Dockerfile-db
image: mytinytodo-dev:mariadb10.5
container_name: ${PLATFORM_NAME}-db
#restart: always
environment:
MARIADB_ROOT_PASSWORD: JustForDev
MARIADB_USER: mtt
MARIADB_PASSWORD: mtt
MARIADB_DATABASE: mytinytodo
volumes:
- ../_mariadb105/db_data:/var/lib/mysql
networks:
- network