From 70dff9d6966a53f4d29e654165714cc8519fd4bf Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:21:30 -0400 Subject: [PATCH] chore: create docker-compose.yml Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- docker-compose.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..04074f3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,46 @@ +services: + postgres: + image: postgres:17-alpine + container_name: postgres + restart: always + environment: + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + volumes: + - postgres_data:/var/lib/postgresql/data + - ./initdb:/docker-entrypoint-initdb.d + ports: + - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] + interval: 10s + timeout: 5s + retries: 5 + networks: + - backend + + valkey: + image: valkey/valkey:8-alpine + container_name: valkey + restart: always + command: ["valkey-server", "--requirepass", "${VALKEY_PASSWORD}"] + ports: + - "6379:6379" + volumes: + - valkey_data:/data + healthcheck: + test: ["CMD", "valkey-cli", "-a", "${VALKEY_PASSWORD}", "ping"] + interval: 10s + timeout: 5s + retries: 5 + networks: + - backend + +volumes: + postgres_data: + valkey_data: + +networks: + backend: + driver: bridge