Set COMPOSER_HOME and define VOLUMEs

This commit is contained in:
Deon George 2023-02-04 21:31:13 +11:00
parent d7b97dfce7
commit e266319386
3 changed files with 5 additions and 3 deletions

View File

@ -4,8 +4,9 @@ x86_64:build-manifest:
- docker manifest create ${CI_REGISTRY_IMAGE}:${VERSION} ${CI_REGISTRY_IMAGE}:${VERSION}-armv7l ${CI_REGISTRY_IMAGE}:${VERSION}-x86_64 ${CI_REGISTRY_IMAGE}:${VERSION}-arm64
- docker manifest push --purge ${CI_REGISTRY_IMAGE}:${VERSION}
- apk add --no-cache curl
- echo curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=pgsql ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=pgsql ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=ldap ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=mysql ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=ldap ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
tags:
- docker

View File

@ -34,9 +34,9 @@ RUN apk add --no-cache libjpeg libgd libpng freetype freetype-dev zlib-dev libpn
docker-php-ext-install -j$(nproc) gd && \
apk del --no-cache zlib-dev libpng-dev jpeg-dev freetype-dev
RUN ip addr list && env
# Add composer
RUN curl -4 https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
ENV COMPOSER_HOME=/var/cache/composer
COPY docker/www.conf /usr/local/etc/php-fpm.d/
COPY docker/nginx-app.conf /etc/nginx/http.d/default.conf
@ -44,6 +44,7 @@ COPY docker/nginx-app.conf /etc/nginx/http.d/default.conf
COPY docker/init /sbin/
RUN chmod 550 /sbin/init && chown 0:0 /sbin/init
VOLUME [ "/var/cache/composer" ]
WORKDIR /var/www/html
EXPOSE 80
ENTRYPOINT [ "/sbin/init" ]

View File

@ -4,7 +4,7 @@ set -e
role=${CONTAINER_ROLE:-app}
env=${APP_ENV:-live}
php=${PHP_DIR:-/var/www/html}
composer=${COMPOSER_DIR:-/var/www/.composer}
composer=${COMPOSER_HOME:-/var/cache/composer}
SITE_USER=${SITE_USER:-www-data}
NGINX_START=${NGINX_START:-TRUE}