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 1/6] 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 From a449129a6173d3d9eb7c043fa58b7b215aa99739 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:22:49 -0400 Subject: [PATCH 2/6] chore: create .env.example for docker compose file Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- .env.example | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..558a922 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +POSTGRES_USER=your_postgres_user +POSTGRES_PASSWORD=your_postgres_password +POSTGRES_DB=your_database_name +VALKEY_PASSWORD=your_valkey_password From 0a4a3c0af4f9aca5caf12338ab856023325853bd Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:23:24 -0400 Subject: [PATCH 3/6] chore: update .gitignore to ignore .env files Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fa61b2c..ed5b147 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ drizzle/ .vscode/ config.json -.yarn \ No newline at end of file +.env +.yarn From 022ab6d272baf5030649248204f14a06b895597c Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:24:52 -0400 Subject: [PATCH 4/6] chore: update .gitignore to ignore initdb directory Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ed5b147..9176f49 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ target/ node_modules/ drizzle/ .vscode/ +initdb/ config.json .env .yarn From 6517b51f225a7de860eeb6c4617654208f5e4f88 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:34:41 -0400 Subject: [PATCH 5/6] chore: update .gitignore Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9176f49..ed5b147 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ target/ node_modules/ drizzle/ .vscode/ -initdb/ config.json .env .yarn From 654bdce7171fddcb06a22a6b5ebd9af0e39e1dcf Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:35:19 -0400 Subject: [PATCH 6/6] chore: remove initdb mount as it's not needed Signed-off-by: Ahmad <103906421+ahmadk953@users.noreply.github.com> --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 04074f3..5fd02bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,6 @@ services: POSTGRES_DB: ${POSTGRES_DB} volumes: - postgres_data:/var/lib/postgresql/data - - ./initdb:/docker-entrypoint-initdb.d ports: - "5432:5432" healthcheck: