diff --git a/dev/Dockerfile.nginx b/dev/Dockerfile.nginx new file mode 100644 index 00000000..a2db4fa0 --- /dev/null +++ b/dev/Dockerfile.nginx @@ -0,0 +1,26 @@ +FROM trafex/php-nginx:3.10.0 AS build + +USER root + +RUN cd / && \ + apk add --no-cache php84-pear php84-dev gcc musl-dev make krb5-dev && \ + wget https://pecl.php.net/get/krb5-1.2.4.tgz && \ + tar zxf krb5-1.2.4.tgz && cd krb5-1.2.4 && \ + phpize84 && \ + ./configure --with-krb5kadm=S && \ + make -j8 && make install + +FROM trafex/php-nginx:3.10.0 AS final + +COPY --from=build /usr/lib/php84/modules/krb5.so /usr/lib/php84/modules/krb5.so + +USER root + +RUN apk add --no-cache php84-pdo_mysql php84-redis krb5 krb5-pkinit \ + php84-pcntl php84-posix php84-sodium php84-simplexml git && \ + echo 'extension=krb5.so' > /etc/php84/conf.d/krb5.ini && \ + echo -e '[safe]\ndirectory = *' > /.gitconfig && \ + wget https://getcomposer.org/download/2.9.7/composer.phar -O /usr/bin/composer && \ + chmod a+x /usr/bin/composer + +USER nobody diff --git a/dev/docker-hms-init.sh b/dev/docker-hms-init.sh new file mode 100755 index 00000000..58ccdc30 --- /dev/null +++ b/dev/docker-hms-init.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +cd /hms + +composer upgrade --no-security-blocking + +php artisan make:cache-table || true +php artisan key:generate +php artisan migrate +php artisan doctrine:migration:refresh -n +php artisan hms:database:refresh-views +php artisan hms:database:refresh-procedures +php artisan permissions:defaults +php artisan meta:sync +php artisan db:seed +yes | php artisan passport:install +yes | php artisan ziggy:generate diff --git a/dev/docker-init.sql b/dev/docker-init.sql new file mode 100644 index 00000000..3adcc43e --- /dev/null +++ b/dev/docker-init.sql @@ -0,0 +1 @@ +CREATE DATABASE IF NOT EXISTS hms; diff --git a/dev/docker-krb5-init.sh b/dev/docker-krb5-init.sh new file mode 100755 index 00000000..55545588 --- /dev/null +++ b/dev/docker-krb5-init.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +sleep 5 + +# Setup kerberos keytab +export KRB5_CONFIG=/shared/krb5.conf +cat > "$KRB5_CONFIG" <