Added docker files

This commit is contained in:
Nikki Locke 2022-02-16 12:19:18 +00:00
parent b2adec2271
commit a9b363c0b1
3 changed files with 49 additions and 0 deletions

10
.env Executable file
View File

@ -0,0 +1,10 @@
SUBNET=172.16.28
EXPOSE_APACHE_WEB_SERVER_ON_PORT=8787
EXPOSE_APACHE_WEB_SERVER_ONLY_ON_IP_ADDRESS_COLON=
EXPOSE_MARIADB_ON_PORT=3386
MARIADB_ROOT_PASSWORD=qwerty
MARIADB_USERNAME=root
MARIADB_PASSWORD=qwerty
MARIADB_HOSTNAME=mariadb
MARIADB_PORT=3306
MARIADB_DATABASE_NAME=captcheck

26
docker-compose.yml Executable file
View File

@ -0,0 +1,26 @@
version: "3.6"
services:
web:
build: ./docker-web
restart: always
ports:
- ${EXPOSE_APACHE_WEB_SERVER_ONLY_ON_IP_ADDRESS_COLON}${EXPOSE_APACHE_WEB_SERVER_ON_PORT}:80
volumes:
- .:/var/www/html
environment:
MARIADB_USERNAME: ${MARIADB_USERNAME}
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_HOSTNAME: ${MARIADB_HOSTNAME}
MARIADB_PORT: ${MARIADB_PORT}
MARIADB_DATABASE_NAME: ${MARIADB_DATABASE_NAME}
mariadb:
image: mariadb:10.4
restart: always
volumes:
- ./data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
ports:
- 127.0.0.1:${EXPOSE_MARIADB_ON_PORT}:${MARIADB_PORT}

13
docker-web/Dockerfile Executable file
View File

@ -0,0 +1,13 @@
FROM php:7.2-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN docker-php-ext-enable mysqli
RUN a2enmod rewrite
RUN apt-get update && apt-get install -y zlib1g-dev libpng-dev libfreetype6-dev
RUN docker-php-ext-configure gd --with-gd --with-zlib-dir --with-png-dir --with-freetype-dir
RUN docker-php-ext-install gd