From eed89dced3c95b5f01c103150c971c40d58b0811 Mon Sep 17 00:00:00 2001 From: leehk Date: Fri, 11 Apr 2025 18:46:31 +0800 Subject: [PATCH 1/4] update --- app/backend/Dockerfile.prod | 1 + app/frontend/package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/backend/Dockerfile.prod b/app/backend/Dockerfile.prod index ad198f3..a517f94 100644 --- a/app/backend/Dockerfile.prod +++ b/app/backend/Dockerfile.prod @@ -80,5 +80,6 @@ RUN chown -R app:app $APP_HOME # change to the app user USER app + # run gunicorn CMD pipenv run gunicorn --bind 0.0.0.0:$PORT backend.main:app -k uvicorn.workers.UvicornWorker \ No newline at end of file diff --git a/app/frontend/package.json b/app/frontend/package.json index 2cea4a8..63ea826 100644 --- a/app/frontend/package.json +++ b/app/frontend/package.json @@ -38,6 +38,7 @@ "vitest": "^3.1.1" }, "optionalDependencies": { - "@rollup/rollup-linux-x64-musl": "^3.28.0" + "@rollup/rollup-linux-x64-musl": "^3.28.0", + "@rollup/rollup-linux-x64-gnu": "4.9.5" } } \ No newline at end of file From 2506690ad17c7c1a38517f1c107230dda0ba6619 Mon Sep 17 00:00:00 2001 From: leehk Date: Fri, 11 Apr 2025 19:07:22 +0800 Subject: [PATCH 2/4] self-hosted --- .github/workflows/develop.yml | 4 ++-- app/backend/Dockerfile.prod | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 220d8b5..2c4cdf0 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -12,7 +12,7 @@ jobs: build: name: Build Docker Image - runs-on: ubuntu-latest + runs-on: self-hosted permissions: contents: read packages: write @@ -41,7 +41,7 @@ jobs: test: name: Test Docker Image - runs-on: ubuntu-latest + runs-on: self-hosted needs: build steps: - name: Checkout diff --git a/app/backend/Dockerfile.prod b/app/backend/Dockerfile.prod index a517f94..64b9b05 100644 --- a/app/backend/Dockerfile.prod +++ b/app/backend/Dockerfile.prod @@ -23,7 +23,7 @@ RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv RUN pip install --no-cache-dir --find-links=/usr/src/app/wheels pipenv COPY ./Pipfile . -RUN pipenv lock --pre && pipenv install --deploy +RUN pipenv install --deploy # add app COPY . /usr/src/app @@ -68,7 +68,7 @@ COPY --from=builder /usr/src/app/wheels /wheels COPY --from=builder /usr/src/app/Pipfile . RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install --no-cache /wheels/* -RUN pipenv lock --pre && pipenv install --deploy +RUN pipenv install --deploy RUN pipenv run pip install "uvicorn[standard]==0.26.0" # add app @@ -80,6 +80,5 @@ RUN chown -R app:app $APP_HOME # change to the app user USER app - # run gunicorn CMD pipenv run gunicorn --bind 0.0.0.0:$PORT backend.main:app -k uvicorn.workers.UvicornWorker \ No newline at end of file From 29cee941f14e43e7901f35e2dcacb869e9dce078 Mon Sep 17 00:00:00 2001 From: leehk Date: Fri, 11 Apr 2025 20:29:08 +0800 Subject: [PATCH 3/4] include pipenv dev --- app/backend/Dockerfile.prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/backend/Dockerfile.prod b/app/backend/Dockerfile.prod index 64b9b05..128f21a 100644 --- a/app/backend/Dockerfile.prod +++ b/app/backend/Dockerfile.prod @@ -68,7 +68,7 @@ COPY --from=builder /usr/src/app/wheels /wheels COPY --from=builder /usr/src/app/Pipfile . RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install --no-cache /wheels/* -RUN pipenv install --deploy +RUN pipenv install --deploy --dev RUN pipenv run pip install "uvicorn[standard]==0.26.0" # add app From 4b5c7dd61b24d93b40a57665b3a5dc4781440b92 Mon Sep 17 00:00:00 2001 From: leehk Date: Fri, 11 Apr 2025 21:19:53 +0800 Subject: [PATCH 4/4] update --- app/backend/Dockerfile.prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/backend/Dockerfile.prod b/app/backend/Dockerfile.prod index 128f21a..a709a8a 100644 --- a/app/backend/Dockerfile.prod +++ b/app/backend/Dockerfile.prod @@ -23,7 +23,7 @@ RUN pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv RUN pip install --no-cache-dir --find-links=/usr/src/app/wheels pipenv COPY ./Pipfile . -RUN pipenv install --deploy +RUN pipenv install --deploy --dev # add app COPY . /usr/src/app