From 0912395837bcfb67baad63dcaaebc657529ad6b1 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Sun, 24 Nov 2024 11:35:21 +0800 Subject: [PATCH] ci: updated dockerfile --- .github/workflows/docker-crawlab.yml | 12 ------------ Dockerfile | 7 +++++++ docker/ghcr/.docker-compose.yml.swp | Bin 0 -> 12288 bytes docker/ghcr/docker-compose.yml | 4 ++-- 4 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 docker/ghcr/.docker-compose.yml.swp diff --git a/.github/workflows/docker-crawlab.yml b/.github/workflows/docker-crawlab.yml index b4da93b6..8db9df67 100644 --- a/.github/workflows/docker-crawlab.yml +++ b/.github/workflows/docker-crawlab.yml @@ -304,23 +304,11 @@ jobs: CRAWLAB_MONGO_PORT: 27017 ports: - 8080:8080 - options: >- - --health-cmd "curl -f http://localhost:8080/api/health || exit 1" - --health-interval 30s - --health-timeout 10s - --health-retries 5 worker: image: ghcr.io/${{ github.repository_owner }}/crawlab:${{ needs.setup.outputs.version }} env: CRAWLAB_NODE_MASTER: N CRAWLAB_MASTER_HOST: master - ports: - - 8001:8000 - options: >- - --health-cmd "curl -f http://localhost:8001/health || exit 1" - --health-interval 30s - --health-timeout 10s - --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index adbc2281..c60dfaa6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,3 +26,10 @@ COPY ./docker/bin/* /app/bin # start backend CMD ["/bin/bash", "/app/bin/docker-init.sh"] + +# frontend port +EXPOSE 8080 + +# healthcheck for backend +HEALTHCHECK --interval=1m --timeout=3s \ + CMD curl -f http://localhost:8000/health || exit 1 \ No newline at end of file diff --git a/docker/ghcr/.docker-compose.yml.swp b/docker/ghcr/.docker-compose.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..fe323879a0e928ad1fab18720227ced2d297c720 GIT binary patch literal 12288 zcmeI2J#W)M7{{-uBZUeU#=}MGf@7BmDR@g?RFFth+5&LibzN7*KUHAsD zcHmnu@DX4{Oh`<;ZAffg_&atYNJR%&Ks+b?a=sToXaDXpM0vXIjVmpFspc}2S;k)O zFZPz7A535CGL{HEco2%TSBxD|T9_B5x!n@}qEb8dx>mJV`68aU=kYk8lWBEN`X+aL zEp}tkwT%?XxPeipEBqaq2BSVFP-ttX7y7!owtbakDwnnU$>d5C3saK}kO3H&Vf70O z!>{_Bb(Wt#b)Bq`0Wv@a$N(8217v^fDHVD21LM^eVnn^p!olP^!xwoNya{ccVHj%K>$|395@4} z!M78PeE@I3Q?LhOunlg5bubG)%`o;Bya3O@6VL|%u)qm$fM@suK7;q5c&1l?3K<{+ zWPl8i0Wv@a$N(8217zTk0ge(Sq9;9`sI;fNi;P!S3|B?b(&$L$9xsN9VxmN|q*PSA#y0fb^@~ek&D}_aO zEmETl?4MG!y>kyoYi~7IJv)#C8LR9O?k@v*f2Z)`RQ$rX&8>#paItp{w-lHuZSq6g v(Oz3^k9VVpcl2i5`kl@A;b8pPW|V