Added managment container

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2021-04-07 11:28:54 +02:00
parent ce4c8b8cb2
commit 90c751c836
2 changed files with 27 additions and 0 deletions

20
managment/Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM docker.io/library/php:7.2-apache
RUN apt-get update -y && apt-get install -y git
RUN docker-php-ext-install -j$(nproc) mysqli
WORKDIR /
RUN git clone https://gitlab.com/merspieler/osm2city-scripts.git && cp /osm2city-scripts/web/index.php /var/www/html/ && rm -rf /osm2city-scripts
WORKDIR /var/www/html/
COPY config.php .
# Set default env vars
ENV SQL_HOST mysql
ENV SQL_PORT 3306
ENV SQL_USER flightgear
ENV SQL_PASSWORD FG-is-GREAT
ENV SQL_DATABASE worldbuild

7
managment/config.php Normal file
View file

@ -0,0 +1,7 @@
<?php
$SQL_SERVER = getenv('SQL_HOST');
$SQL_PORT = getenv('SQL_PORT');
$SQL_DATABASE = getenv('SQL_DATABASE');
$SQL_USER = getenv('SQL_USER');
$SQL_PASSWORD = getenv('SQL_PASSWORD');
?>