From e28602059f0a7ec89a16a937e04dff5fb9657339 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Schwertfeger" Date: Sun, 5 Jan 2025 14:28:11 +0100 Subject: [PATCH] Change database credentials (#26) --- Dockerfile | 9 +++------ docker-compose.yaml | 13 +++++++------ src/kraken_infinity_grid/cli.py | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 517b956..05fe459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM python:3.11-slim AS builder -ENV TZ=Europe/Berlin \ - DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND=noninteractive WORKDIR /apps COPY . /apps @@ -18,8 +17,7 @@ RUN --mount=type=cache,target=/var/lib/apt/,sharing=locked \ FROM python:3.11-slim -ENV TZ=Europe/Berlin \ - DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND=noninteractive RUN --mount=type=bind,target=/context,from=builder,source=/apps \ --mount=type=cache,target=/var/lib/apt/,sharing=locked \ @@ -45,6 +43,5 @@ RUN --mount=type=bind,target=/context,from=builder,source=/apps \ ENTRYPOINT ["kraken-infinity-grid", "run"] LABEL maintainer="Benjamin Thomas Schwertfeger contact@b-schwertfeger.de" -LABEL description="A Docker image for running a Trading algorithm for Kraken." +LABEL description="The Infinity Grid Trading Algorithm for the Kraken Cryptocurrency Exchange." LABEL org.opencontainers.image.source="https://github.com/btschwerfeger/kraken-infinity-grid" -# LABEL org.opencontainers.image.licenses="GNU General Public License v3.0" diff --git a/docker-compose.yaml b/docker-compose.yaml index 7e0014b..0466962 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,15 +7,15 @@ services: postgresql: image: postgres:13-bookworm environment: - POSTGRES_USER: kraken-infinity-grid - POSTGRES_PASSWORD: kraken-infinity-grid - POSTGRES_DB: kraken-infinity-grid TZ: Europe/Berlin + POSTGRES_USER: kraken_infinity_grid + POSTGRES_PASSWORD: kraken_infinity_grid + POSTGRES_DB: kraken_infinity_grid restart: on-failure volumes: - postgres-data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U kraken-infinity-grid"] + test: ["CMD-SHELL", "pg_isready -U kraken_infinity_grid"] interval: 10s retries: 5 networks: @@ -27,6 +27,7 @@ services: postgresql: condition: service_healthy environment: + TZ: Europe/Berlin # General settings KRAKEN_API_KEY: ${KRAKEN_API_KEY} KRAKEN_SECRET_KEY: ${KRAKEN_SECRET_KEY} @@ -55,12 +56,12 @@ services: KRAKEN_RUN_DB_PORT: ${KRAKEN_RUN_DB_PORT} restart: on-failure volumes: - - gridbot-cache:/root/.cache/gridbot:rw + - infinity-grid-cache:/root/.cache/gridbot:rw networks: - internal_network volumes: - gridbot-cache: + infinity-grid-cache: external: false postgres-data: external: false diff --git a/src/kraken_infinity_grid/cli.py b/src/kraken_infinity_grid/cli.py index 024cab5..75be80e 100644 --- a/src/kraken_infinity_grid/cli.py +++ b/src/kraken_infinity_grid/cli.py @@ -227,7 +227,7 @@ def cli(ctx: Context, **kwargs: dict) -> None: @option( "--db-name", type=STRING, - default="kraken-infinity-grid", + default="kraken_infinity_grid", help="PostgreSQL DB name", required=True, )