diff --git a/.github/workflows/deploy-int.yml b/.github/workflows/deploy-int.yml index 063c3d823..18becfa63 100644 --- a/.github/workflows/deploy-int.yml +++ b/.github/workflows/deploy-int.yml @@ -71,5 +71,5 @@ jobs: docker-compose run --rm php composer config repositories.gally-premium composer https://packagist.smile.fr/gally && docker-compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-standard:${{ env.composer_version }} as ${{ inputs.last_published_version }}\" && docker-compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-premium:${{ env.composer_version }}\" && - SERVER_NAME=$HOSTNAME APP_SECRET=$APP_SECRET POSTGRES_PASSWORD=$POSTGRES_PASSWORD docker-compose -f docker-compose.yml -f docker-compose.int.yml up -d --build + SERVER_NAME=$HOSTNAME APP_SECRET=$APP_SECRET POSTGRES_PASSWORD=$POSTGRES_PASSWORD COMPOSER_AUTH='$COMPOSER_AUTH' docker-compose -f docker-compose.yml -f docker-compose.int.yml up -d --build " diff --git a/api/Dockerfile b/api/Dockerfile index 21f3f7efd..849049d1c 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -102,6 +102,9 @@ COPY composer.json composer.lock symfony.lock ./ # (for docker-compose version, we need a least on file to exist, so we add the composer.json to prevent failure if packages is missing) COPY composer.json package* packages/ +ARG COMPOSER_AUTH +ENV COMPOSER_AUTH=${COMPOSER_AUTH} + RUN set -eux; \ composer install --prefer-dist --no-dev --no-scripts --no-progress; \ composer clear-cache diff --git a/docker-compose.int.yml b/docker-compose.int.yml index 2eba22cae..ae2399de5 100644 --- a/docker-compose.int.yml +++ b/docker-compose.int.yml @@ -4,6 +4,9 @@ version: "3.4" # Production environment override services: php: + build: + args: + COMPOSER_AUTH: ${COMPOSER_AUTH} environment: APP_ENV: dev # Needed for fixtures bundles to work. APP_SECRET: ${APP_SECRET} @@ -11,6 +14,9 @@ services: XDEBUG_MODE: 'off' caddy: + build: + args: + COMPOSER_AUTH: ${COMPOSER_AUTH} environment: EXAMPLE_UPSTREAM: pwa:3000 # MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} diff --git a/docker-compose.yml b/docker-compose.yml index ceeb8121c..09ccb396d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -105,7 +105,7 @@ services: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-!ChangeMe!} - POSTGRES_USER=${POSTGRES_USER:-api-platform} volumes: - - db_data:/var/lib/postgresql/data:rw,z + - db_data:/var/lib/postgresql/data:rw # you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! # - ./api/docker/db/data:/var/lib/postgresql/data:rw,z @@ -132,7 +132,7 @@ services: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" # 512 Mo HEAP - cluster.routing.allocation.disk.threshold_enabled=false # Avoid ES going read-only because low disk space availability volumes: - - es_data:/usr/share/elasticsearch/data:rw,z + - es_data:/usr/share/elasticsearch/data:rw ulimits: memlock: soft: -1