From 5a826b84faaeb7d658493851950c95236336c602 Mon Sep 17 00:00:00 2001 From: Pierre Gauthier Date: Tue, 10 Sep 2024 10:07:09 +0200 Subject: [PATCH] Deploy: FIx database creation --- .github/workflows/deploy-int.yml | 1 + .github/workflows/tests.yml | 4 +--- compose.int.yml | 6 +++--- compose.override.yaml | 1 - docker/front/Dockerfile | 3 ++- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-int.yml b/.github/workflows/deploy-int.yml index f87557530..ae3f40ef8 100644 --- a/.github/workflows/deploy-int.yml +++ b/.github/workflows/deploy-int.yml @@ -68,6 +68,7 @@ jobs: docker system prune -af && ([[ $(docker volume ls -q | awk '!/_/' | wc -l) -eq 0 ]] || docker volume rm $(docker volume ls -q | awk '!/_/' | tr '\n' ' ')) && make .env && + POSTGRES_PASSWORD=$POSTGRES_PASSWORD docker compose -f compose.yml -f compose.int.yml start database && docker compose -f compose.yml -f compose.int.yml down && git fetch --all && git reset --hard && git checkout ${{ env.back_branch }} && [ -d front/gally-admin ] || git clone https://github.com/Elastic-Suite/gally-admin.git front/gally-admin && diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfb3c4ebe..7c3021d05 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,8 +76,6 @@ jobs: command: require gally/gally-premium:${{ env.composer_version }} env: COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - - name: Generate certificates - run: bash ./docker/generate-certs.sh - name: Pull images run: ${{env.docker_compose_cmd}} pull --ignore-pull-failures || true - name: Start services @@ -140,7 +138,7 @@ jobs: file: api/coverage/coverage.xml signature: "Backend Coverage of this branch" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: coverage-report path: api/coverage/coverage.xml diff --git a/compose.int.yml b/compose.int.yml index 3af9f0979..7d80cf8c6 100644 --- a/compose.int.yml +++ b/compose.int.yml @@ -1,9 +1,9 @@ -services: # Todo upgrade : test inte +services: router: build: context: ./docker/router environment: - - EXAMPLE_UPSTREAM=example:3001 + - EXAMPLE_UPSTREAM=pwa:3000 php: environment: @@ -15,4 +15,4 @@ services: # Todo upgrade : test inte build: target: gally_pwa_int args: - public_url: https://${PWA_SERVER_NAME}/example + - public_url=https://${SERVER_NAME:-${PWA_SERVER_NAME:-gally.localhost}}/example diff --git a/compose.override.yaml b/compose.override.yaml index 1d5e46139..6ee6952cc 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -1,6 +1,5 @@ # Development environment override services: - # Todo upgrade: connect example app in router router: volumes: - ./api/public:/app/public diff --git a/docker/front/Dockerfile b/docker/front/Dockerfile index f5a05f1d6..1dd9364ab 100644 --- a/docker/front/Dockerfile +++ b/docker/front/Dockerfile @@ -14,6 +14,8 @@ EXPOSE 3001 WORKDIR /usr/src/front +ARG NEXT_PUBLIC_API_URL +ENV NEXT_PUBLIC_API_URL $NEXT_PUBLIC_API_URL ENV NEXT_TELEMETRY_DISABLED 1 COPY --from=front_src . ./ @@ -77,7 +79,6 @@ CMD ["yarn", "dev"] FROM gally_example_ci AS gally_example_dev ENV WDS_SOCKET_PORT 443 -ARG NEXT_PUBLIC_API_URL RUN USER=node && \ GROUP=node && \