From 704cf23fec0993606442b10a8e22e0e5a2e828c9 Mon Sep 17 00:00:00 2001 From: Carlos Wu Fei Date: Mon, 18 Nov 2024 05:08:04 +0000 Subject: [PATCH] Update nginx unit --- .github/workflows/pr.yml | 4 ++-- Dockerfile | 4 ++-- api/Pipfile | 2 +- api/Pipfile.lock | 4 ++-- config.json | 5 +++-- docker-compose.yml | 7 ++----- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 46e7e84b9..04e44a657 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -153,7 +153,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10.8" + python-version: "3.11" - name: Install pipenv run: | python3 -m pip install pipenv @@ -177,7 +177,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.10.8" + python-version: "3.11" - name: Install pipenv run: python3 -m pip install pipenv - name: Install dependencies diff --git a/Dockerfile b/Dockerfile index 7a0d186ba..7e427a6bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ WORKDIR /app COPY /terminal/ /app/ RUN npm install && npm run build -FROM nginx/unit:1.28.0-python3.10 -RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing build-essential python3-dev python-setuptools libpq-dev +FROM unit:python3.11 +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing build-essential python3-dev libpq-dev COPY --from=build-stage /app/dist /usr/share/nginx/html COPY api api WORKDIR api diff --git a/api/Pipfile b/api/Pipfile index 31ae6434f..cb64c8a78 100644 --- a/api/Pipfile +++ b/api/Pipfile @@ -41,7 +41,7 @@ coverage = "*" ruff = "*" [requires] -python_version = "3.10.8" +python_version = "3.11" [pipenv] allow_prereleases = false diff --git a/api/Pipfile.lock b/api/Pipfile.lock index 2e8dc7709..240af4a28 100644 --- a/api/Pipfile.lock +++ b/api/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "dcd105de99c81fff9be456d4fd3349979936c59c1b877f586cb6d56b9707dcd8" + "sha256": "f02a4bbea7483e279e1661336b2a921a4206900c3ccd5c1e50ae36ddb4a3222b" }, "pipfile-spec": 6, "requires": { - "python_version": "3.10.8" + "python_version": "3.11" }, "sources": [ { diff --git a/config.json b/config.json index 3c337cdd1..01459dad9 100644 --- a/config.json +++ b/config.json @@ -28,11 +28,12 @@ ], "applications": { "api": { - "type": "python 3.10", + "type": "python 3.11", "path": "/api", "module": "main", "callable": "app", "processes": 6 } - } + }, + "access_log": "/dev/stdout" } diff --git a/docker-compose.yml b/docker-compose.yml index b2436b93b..f165f3787 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,10 +11,6 @@ services: - ./pg_data:/var/lib/postgresql/data env_file: - .env - environment: - POSTGRES_USER: "carkod" - POSTGRES_PASSWORD: "2FUd56b3a39Y" - POSTGRES_DB: "binbot" ports: - "5432:5432" healthcheck: @@ -116,7 +112,8 @@ services: # restart: on-failure # container_name: binbot # depends_on: - # - db + # - api_db + # - data_db # env_file: # - .env # environment: