Added apache images, restructured

This commit is contained in:
root 2019-07-08 13:06:34 -05:00
parent 334288e104
commit 188167f6b1
10 changed files with 85 additions and 7 deletions

18
apache-alpine/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM webdevops/php-apache:alpine
MAINTAINER Belman Kraul <bkraul@belmankraul.com>
ENV \
WEB_DOCUMENT_ROOT="/app/public"
RUN git clone https://github.com/kevinpapst/kimai2.git /app && \
sed "s/prod/dev/g" /app/.env.dist > /app/.env && \
chown -R ${APPLICATION_UID}:${APPLICATION_GID} /app && \
su -c '/usr/local/bin/composer install --working-dir=/app --optimize-autoloader' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
rm /app/.env && \
touch /app/.env && \
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env
COPY ./50-kimai-init.sh /opt/docker/provision/entrypoint.d/50-kimai-init.sh
WORKDIR /app

6
apache-alpine/build Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
docker pull webdevops/php-apache:alpine
docker build $1\
-t bkraul/kimai2:apache-alpine \
.

View File

@ -0,0 +1,15 @@
#!/bin
echo Refreshing .env file...
echo APP_ENV=${APP_ENV} > /app/.env
echo DATABASE_URL=${DATABASE_URL} >> /app/.env
echo MAILER_FROM=${MAILER_FROM} >> /app/.env
echo MAILER_URL=${MAILER_URL} >> /app/.env
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env
su -c "/app/bin/console cache:clear --env=${APP_ENV} || true" -l application
su -c "cd /app && composer install --optimize-autoloader || true" -l application
su -c "/app/bin/console doctrine:schema:create || true" -l application
su -c "/app/bin/console doctrine:migrations:version --add --all -n || true" -l application
su -c "/app/bin/console cache:warmup --env=${APP_ENV} || true" -l application
su -c "/app/bin/console kimai:create-user ${APP_ADMIN_USER} ${APP_ADMIN_EMAIL} ROLE_SUPER_ADMIN ${APP_ADMIN_PASS} --env=${APP_ENV} -vvv || true" -l application

View File

@ -0,0 +1,18 @@
FROM webdevops/php-apache:ubuntu-18.04
MAINTAINER Belman Kraul <bkraul@belmankraul.com>
ENV \
WEB_DOCUMENT_ROOT="/app/public"
RUN git clone https://github.com/kevinpapst/kimai2.git /app && \
sed "s/prod/dev/g" /app/.env.dist > /app/.env && \
chown -R ${APPLICATION_UID}:${APPLICATION_GID} /app && \
su -c '/usr/local/bin/composer install --working-dir=/app --optimize-autoloader' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
rm /app/.env && \
touch /app/.env && \
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env
COPY ./50-kimai-init.sh /opt/docker/provision/entrypoint.d/50-kimai-init.sh
WORKDIR /app

View File

@ -0,0 +1,6 @@
#!/bin/sh
docker pull webdevops/php-apache:ubuntu-18.04
docker build $1\
-t bkraul/kimai2:apache-ubuntu-18.04 \
.

View File

@ -2,13 +2,13 @@ FROM webdevops/php-nginx:alpine
MAINTAINER Belman Kraul <bkraul@belmankraul.com>
ENV \
WEB_DOCUMENT_ROOT="/app/public"
WEB_DOCUMENT_ROOT="/app/public"
RUN git clone https://github.com/kevinpapst/kimai2.git /app && \
sed "s/prod/dev/g" /app/.env.dist > /app/.env && \
chown -R ${APPLICATION_UID}:${APPLICATION_GID} /app && \
su -c '/usr/local/bin/composer install --working-dir=/app --optimize-autoloader' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
rm /app/.env && \
touch /app/.env && \
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env

View File

@ -0,0 +1,15 @@
#!/bin
echo Refreshing .env file...
echo APP_ENV=${APP_ENV} > /app/.env
echo DATABASE_URL=${DATABASE_URL} >> /app/.env
echo MAILER_FROM=${MAILER_FROM} >> /app/.env
echo MAILER_URL=${MAILER_URL} >> /app/.env
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env
su -c "/app/bin/console cache:clear --env=${APP_ENV} || true" -l application
su -c "cd /app && composer install --optimize-autoloader || true" -l application
su -c "/app/bin/console doctrine:schema:create || true" -l application
su -c "/app/bin/console doctrine:migrations:version --add --all -n || true" -l application
su -c "/app/bin/console cache:warmup --env=${APP_ENV} || true" -l application
su -c "/app/bin/console kimai:create-user ${APP_ADMIN_USER} ${APP_ADMIN_EMAIL} ROLE_SUPER_ADMIN ${APP_ADMIN_PASS} --env=${APP_ENV} -vvv || true" -l application

View File

@ -2,13 +2,13 @@ FROM webdevops/php-nginx:ubuntu-18.04
MAINTAINER Belman Kraul <bkraul@belmankraul.com>
ENV \
WEB_DOCUMENT_ROOT="/app/public"
WEB_DOCUMENT_ROOT="/app/public"
RUN git clone https://github.com/kevinpapst/kimai2.git /app && \
sed "s/prod/dev/g" /app/.env.dist > /app/.env && \
chown -R ${APPLICATION_UID}:${APPLICATION_GID} /app && \
su -c '/usr/local/bin/composer install --working-dir=/app --optimize-autoloader' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
su -c '/usr/local/bin/composer require zendframework/zend-ldap --working-dir=/app' -l application && \
rm /app/.env && \
touch /app/.env && \
chown ${APPLICATION_UID}:${APPLICATION_GID} /app/.env

View File

@ -2,6 +2,6 @@
docker pull webdevops/php-nginx:ubuntu-18.04
docker build $1\
-t bkraul/kimai2:nginx-ubuntu \
-t bkraul/kimai2:nginx-ubuntu-18.04 \
.