diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index fd98b11..7f74985 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -43,3 +43,30 @@ jobs: - run: npm run typecheck - run: npm run build - run: npm run size + + image: + name: Image starts + runs-on: ubuntu-latest + services: + redis: + image: redis:8-alpine + ports: ["6379:6379"] + steps: + - uses: actions/checkout@v7 + - run: docker build -t hub-check site + - name: Start the image and wait for readiness + run: | + docker run -d --name hub --network host \ + -e APP_URL=http://localhost:3000 -e REDIS_URL=redis://localhost:6379 \ + -e SESSION_SECRET=check -e GITHUB_CLIENT_ID=check -e GITHUB_CLIENT_SECRET=check \ + -e PLATFORM_APP_CLIENT_ID=check -e PLATFORM_APP_PRIVATE_KEY=check \ + -e GITHUB_WEBHOOK_SECRET=check -e DEPLOY_REPORT_SECRET=check \ + hub-check + for attempt in $(seq 1 30); do + if curl -fsS http://localhost:3000/health/ready; then + exit 0 + fi + sleep 2 + done + docker logs hub + exit 1 \ No newline at end of file diff --git a/site/Dockerfile b/site/Dockerfile index 4b3a0ec..178fb54 100644 --- a/site/Dockerfile +++ b/site/Dockerfile @@ -16,6 +16,7 @@ COPY --from=build /app/package.json ./ COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/build ./build COPY --from=build /app/server ./server +COPY --from=build /app/app ./app COPY --from=build /app/scripts/rules.mjs ./scripts/ USER node EXPOSE 3000