Skip to content

Commit

Permalink
Change database credentials (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger authored Jan 5, 2025
1 parent 31778bc commit e286020
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -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"
13 changes: 7 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/kraken_infinity_grid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit e286020

Please sign in to comment.