Autocreate our encryption key when container starts if it isnt already set
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 31s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m23s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 31s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m23s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
This commit is contained in:
parent
565435403f
commit
fcec58441f
@ -8,6 +8,10 @@ RUN install-php-extensions \
|
|||||||
ldap \
|
ldap \
|
||||||
memcached
|
memcached
|
||||||
|
|
||||||
|
RUN sed -i -e 's/^{$CADDY_EXTRA_CONFIG}$/{$CADDY_EXTRA_CONFIG} /' /etc/caddy/Caddyfile
|
||||||
|
RUN sed -i -e 's/^memory_limit = 128M/memory_limit = 1G/' /usr/local/etc/php/php.ini-production
|
||||||
|
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
||||||
|
|
||||||
RUN curl -4 https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
|
RUN curl -4 https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
ENV COMPOSER_HOME=/var/cache/composer
|
ENV COMPOSER_HOME=/var/cache/composer
|
||||||
|
|
||||||
@ -23,13 +27,10 @@ RUN mkdir -p ${COMPOSER_HOME} \
|
|||||||
&& ([ -r auth.json ] && mv auth.json ${COMPOSER_HOME}) || true \
|
&& ([ -r auth.json ] && mv auth.json ${COMPOSER_HOME}) || true \
|
||||||
&& touch .composer.refresh \
|
&& touch .composer.refresh \
|
||||||
&& mv .env.example .env \
|
&& mv .env.example .env \
|
||||||
&& FORCE_PERMS=1 /sbin/init-docker \
|
&& FORCE_PERMS=1 BUILD=1 /sbin/init-docker \
|
||||||
&& rm -rf ${COMPOSER_HOME}/* composer.lock
|
&& rm -rf ${COMPOSER_HOME}/* composer.lock
|
||||||
|
|
||||||
# Fix start up items
|
# Fix start up items
|
||||||
RUN sed -i -e 's/^{$CADDY_EXTRA_CONFIG}$/{$CADDY_EXTRA_CONFIG} /' /etc/caddy/Caddyfile
|
|
||||||
RUN sed -i -e 's/^memory_limit = 128M/memory_limit = 1G/' /usr/local/etc/php/php.ini-production
|
|
||||||
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
|
|
||||||
RUN chown ${SITE_USER} /config/caddy /data/caddy
|
RUN chown ${SITE_USER} /config/caddy /data/caddy
|
||||||
|
|
||||||
USER ${SITE_USER}
|
USER ${SITE_USER}
|
||||||
|
@ -50,10 +50,11 @@ fi
|
|||||||
if [ -r artisan -a -e ${php}/.env ]; then
|
if [ -r artisan -a -e ${php}/.env ]; then
|
||||||
echo "* Laravel Setup..."
|
echo "* Laravel Setup..."
|
||||||
mp=$(mp ${php})
|
mp=$(mp ${php})
|
||||||
echo " - [${php}] is a mount point [${mp}]"
|
|
||||||
|
|
||||||
# Only adjust perms if this is an external mountpoint
|
# Only adjust perms if this is an external mountpoint
|
||||||
if [ -n "${FORCE_PERMS}" -o ${mp} -eq 0 ]; then
|
if [ -n "${FORCE_PERMS}" -o ${mp} -eq 0 ]; then
|
||||||
|
echo " - ${mp} is an external mount point"
|
||||||
|
|
||||||
if [ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ]; then
|
if [ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ]; then
|
||||||
echo " - Setting Permissions..."
|
echo " - Setting Permissions..."
|
||||||
# Make sure our permissions are appropraite
|
# Make sure our permissions are appropraite
|
||||||
@ -96,6 +97,12 @@ if [ -r artisan -a -e ${php}/.env ]; then
|
|||||||
[ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ] && [ ${mp} -eq 0 ] && chmod g-w ${php}
|
[ -n "${FORCE_PERMS}" -o "${env}" != "local" -a -z "${SKIP_PERM}" ] && [ ${mp} -eq 0 ] && chmod g-w ${php}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Generate our Encryption Key
|
||||||
|
[ -z ${BUILD} ] && [ -z ${APP_KEY} ] \
|
||||||
|
&& grep -qe '^APP_KEY=$' .env \
|
||||||
|
&& echo ' + Encryption Key auto created, replace with with "artisan key:generate --force"' \
|
||||||
|
&& ./artisan key:generate
|
||||||
|
|
||||||
# We only check for non mount points, in case this container has the app inside
|
# We only check for non mount points, in case this container has the app inside
|
||||||
mp=$(mp ${php})
|
mp=$(mp ${php})
|
||||||
if [ ${mp} -eq 1 ]; then
|
if [ ${mp} -eq 1 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user