diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 46e7e84b..04e44a65 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 7a0d186b..7e427a6b 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 31ae6434..cb64c8a7 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 2e8dc770..240af4a2 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/api/main.py b/api/main.py index 96a34192..a3990da9 100644 --- a/api/main.py +++ b/api/main.py @@ -30,11 +30,11 @@ async def lifespan(app: FastAPI): api_db.init_db() api_db.create_dummy_bot() result = api_db.select_bot("BTCUSDT") - print("Added dummy bot: ", result) + logging.info("Added dummy bot: ", result) except ServerSelectionTimeoutError: pass except Exception as e: - print("Error", e) + logging.error("Error", e) finally: yield diff --git a/binquant b/binquant index cabb8617..7c9b622d 160000 --- a/binquant +++ b/binquant @@ -1 +1 @@ -Subproject commit cabb86172b07c4f9c0b3aa1fcb81e138c619f4ee +Subproject commit 7c9b622db1f06c5d1f85b9ed42fc7d9d7b8c4fe7 diff --git a/config.json b/config.json index 3c337cdd..01459dad 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 b2436b93..f165f378 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: