From c356cf5d0b95e7a2891b90eaf89b55854484e499 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Thu, 11 Jun 2026 09:29:04 -0700 Subject: [PATCH 01/19] feat(worker): add docker-compose configuration for postgres and redis --- backend/compose.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 backend/compose.yaml diff --git a/backend/compose.yaml b/backend/compose.yaml new file mode 100644 index 0000000..945c535 --- /dev/null +++ b/backend/compose.yaml @@ -0,0 +1,14 @@ +services: + postgres: + image: postgres:16 + environment: + POSTGRES_USER: user + POSTGRES_PASSWORD: password + POSTGRES_DB: cleat_db + ports: + - "5432:5432" + + redis: + image: redis:7 + ports: + - "6379:6379" \ No newline at end of file From 2897313d70b0c2ee57897d113dc92c4096689b62 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Thu, 11 Jun 2026 10:15:49 -0700 Subject: [PATCH 02/19] feat(backend): add postgres and redis configs to api and worker - Add Postgres and Redis configurations to the application.yml files in the api and worker modules. - Remove autoconfigure excludes from the application.yml files. --- .../apps/api/src/main/resources/application.yml | 17 ++++++++++------- .../worker/src/main/resources/application.yml | 15 ++++++++++----- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/backend/apps/api/src/main/resources/application.yml b/backend/apps/api/src/main/resources/application.yml index 31322b9..575f5b3 100644 --- a/backend/apps/api/src/main/resources/application.yml +++ b/backend/apps/api/src/main/resources/application.yml @@ -1,13 +1,16 @@ spring: application: name: cleat-api - autoconfigure: - exclude: - # Temporary: database is not wired yet. - # Remove these excludes once datasource is configured in issue #5. - - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration - - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration + datasource: + url: jdbc:postgresql://localhost:5432/cleat_db + username: user + password: password + driver-class-name: org.postgresql.Driver + + data: + redis: + host: localhost + port: 6379 server: port: 8080 diff --git a/backend/apps/worker/src/main/resources/application.yml b/backend/apps/worker/src/main/resources/application.yml index d519db1..af26b79 100644 --- a/backend/apps/worker/src/main/resources/application.yml +++ b/backend/apps/worker/src/main/resources/application.yml @@ -1,11 +1,16 @@ spring: application: name: cleat-worker - # TODO: These excludes are temporary until the datasource lands in #5 - autoconfigure: - exclude: - - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration - - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration + datasource: + url: jdbc:postgresql://localhost:5432/cleat_db + username: user + password: password + driver-class-name: org.postgresql.Driver + + data: + redis: + host: localhost + port: 6379 server: port: 8081 From a02ca4bac18518825e19303974716ce858e68315 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Thu, 11 Jun 2026 10:30:41 -0700 Subject: [PATCH 03/19] docs(backend): add docker setup instructions to README --- backend/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/backend/README.md b/backend/README.md index 267e8eb..02fee9f 100644 --- a/backend/README.md +++ b/backend/README.md @@ -59,3 +59,29 @@ for example `dev.cleat.domain` and `dev.cleat.githubclient`. Local dependencies (Postgres, Redis) are expected to run via Docker Compose. The two services build into one container image each. + + +## Docker Setup + +This project uses Docker Compose to orchestrate the backend services, including the API, Worker, PostgreSQL database, and Redis cache. + +### Prerequisites + +- [Docker](https://www.docker.com/) +- [Docker Compose](https://docs.docker.com/compose/) + +### Getting Started + +Navigate to the `backend` directory and use the following commands: + +1. **Start the Services:** + docker compose up -d + +2. **Verify Service Status:** + docker compose ps + +3. **Stop the Services:** + docker compose down + +### Configuration +The environment-specific configurations are managed within the `application.yml` files located in each module (`api` and `worker`). \ No newline at end of file From fd4836d094342228987c7d0ae2820aa6a7ff9576 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Thu, 11 Jun 2026 11:41:40 -0700 Subject: [PATCH 04/19] test(infra): configure Testcontainers with ServiceConnection for api and worker - Add spring-boot-testcontainers and testcontainers dependencies to both modules - Implement AbstractIntegrationTest base class for automatic Postgres and Redis setup - Update existing tests to extend AbstractIntegrationTest for isolated test environments - Ensure Flyway and datasource connectivity via @ServiceConnection in integration tests --- backend/apps/api/build.gradle.kts | 7 +++++++ .../cleat/api/AbstractIntegrationTest.java | 21 +++++++++++++++++++ .../java/dev/cleat/api/CleatApiTests.java | 2 +- backend/apps/worker/build.gradle.kts | 7 +++++++ .../cleat/worker/AbstractIntegrationTest.java | 21 +++++++++++++++++++ .../worker/CleatWorkerApplicationTests.java | 2 +- backend/docker | 0 7 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 backend/apps/api/src/test/java/dev/cleat/api/AbstractIntegrationTest.java create mode 100644 backend/apps/worker/src/test/java/dev/cleat/worker/AbstractIntegrationTest.java create mode 100644 backend/docker diff --git a/backend/apps/api/build.gradle.kts b/backend/apps/api/build.gradle.kts index 2a5efe5..a1b6652 100644 --- a/backend/apps/api/build.gradle.kts +++ b/backend/apps/api/build.gradle.kts @@ -15,4 +15,11 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-security") testImplementation("org.springframework.boot:spring-boot-starter-test") + + testImplementation(platform("org.testcontainers:testcontainers-bom:1.20.1")) + testImplementation("org.testcontainers:junit-jupiter") + testImplementation("org.testcontainers:postgresql") + testImplementation("org.testcontainers:testcontainers") + + testImplementation("org.springframework.boot:spring-boot-testcontainers") } diff --git a/backend/apps/api/src/test/java/dev/cleat/api/AbstractIntegrationTest.java b/backend/apps/api/src/test/java/dev/cleat/api/AbstractIntegrationTest.java new file mode 100644 index 0000000..7af426b --- /dev/null +++ b/backend/apps/api/src/test/java/dev/cleat/api/AbstractIntegrationTest.java @@ -0,0 +1,21 @@ +package dev.cleat.api; + +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; + +@Testcontainers +@SpringBootTest +public abstract class AbstractIntegrationTest { + + @Container + @ServiceConnection + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:16-alpine"); + + @Container + @ServiceConnection + static GenericContainer redis = new GenericContainer<>("redis:7-alpine").withExposedPorts(6379); +} diff --git a/backend/apps/api/src/test/java/dev/cleat/api/CleatApiTests.java b/backend/apps/api/src/test/java/dev/cleat/api/CleatApiTests.java index aa02220..eb41e9f 100644 --- a/backend/apps/api/src/test/java/dev/cleat/api/CleatApiTests.java +++ b/backend/apps/api/src/test/java/dev/cleat/api/CleatApiTests.java @@ -4,7 +4,7 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -public class CleatApiTests { +public class CleatApiTests extends AbstractIntegrationTest { @Test void contextLoad() {} diff --git a/backend/apps/worker/build.gradle.kts b/backend/apps/worker/build.gradle.kts index e2db9c0..b1178df 100644 --- a/backend/apps/worker/build.gradle.kts +++ b/backend/apps/worker/build.gradle.kts @@ -14,4 +14,11 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-actuator") testImplementation("org.springframework.boot:spring-boot-starter-test") + + testImplementation(platform("org.testcontainers:testcontainers-bom:1.20.1")) + testImplementation("org.testcontainers:junit-jupiter") + testImplementation("org.testcontainers:postgresql") + testImplementation("org.testcontainers:testcontainers") + + testImplementation("org.springframework.boot:spring-boot-testcontainers") } diff --git a/backend/apps/worker/src/test/java/dev/cleat/worker/AbstractIntegrationTest.java b/backend/apps/worker/src/test/java/dev/cleat/worker/AbstractIntegrationTest.java new file mode 100644 index 0000000..63842d6 --- /dev/null +++ b/backend/apps/worker/src/test/java/dev/cleat/worker/AbstractIntegrationTest.java @@ -0,0 +1,21 @@ +package dev.cleat.worker; + +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; + +@Testcontainers +@SpringBootTest +public abstract class AbstractIntegrationTest { + + @Container + @ServiceConnection + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:16-alpine"); + + @Container + @ServiceConnection + static GenericContainer redis = new GenericContainer<>("redis:7-alpine").withExposedPorts(6379); +} diff --git a/backend/apps/worker/src/test/java/dev/cleat/worker/CleatWorkerApplicationTests.java b/backend/apps/worker/src/test/java/dev/cleat/worker/CleatWorkerApplicationTests.java index 45b7c09..7a6f1f4 100644 --- a/backend/apps/worker/src/test/java/dev/cleat/worker/CleatWorkerApplicationTests.java +++ b/backend/apps/worker/src/test/java/dev/cleat/worker/CleatWorkerApplicationTests.java @@ -4,7 +4,7 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -public class CleatWorkerApplicationTests { +public class CleatWorkerApplicationTests extends AbstractIntegrationTest { @Test void contextLoads() {} diff --git a/backend/docker b/backend/docker new file mode 100644 index 0000000..e69de29 From 430e129653acfda84a1228083958145c36278f91 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 03:43:47 -0700 Subject: [PATCH 05/19] chore(backend): use testcontainers-bom for version management --- backend/Task | 0 backend/There | 0 backend/apps/api/build.gradle.kts | 4 ---- backend/apps/worker/build.gradle.kts | 4 ---- backend/build.gradle.kts | 1 + backend/gradle.properties | 1 + backend/initializationError | 0 7 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 backend/Task create mode 100644 backend/There create mode 100644 backend/initializationError diff --git a/backend/Task b/backend/Task new file mode 100644 index 0000000..e69de29 diff --git a/backend/There b/backend/There new file mode 100644 index 0000000..e69de29 diff --git a/backend/apps/api/build.gradle.kts b/backend/apps/api/build.gradle.kts index a1b6652..3c648f5 100644 --- a/backend/apps/api/build.gradle.kts +++ b/backend/apps/api/build.gradle.kts @@ -15,11 +15,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-security") testImplementation("org.springframework.boot:spring-boot-starter-test") - - testImplementation(platform("org.testcontainers:testcontainers-bom:1.20.1")) testImplementation("org.testcontainers:junit-jupiter") testImplementation("org.testcontainers:postgresql") testImplementation("org.testcontainers:testcontainers") - - testImplementation("org.springframework.boot:spring-boot-testcontainers") } diff --git a/backend/apps/worker/build.gradle.kts b/backend/apps/worker/build.gradle.kts index b1178df..4c98c92 100644 --- a/backend/apps/worker/build.gradle.kts +++ b/backend/apps/worker/build.gradle.kts @@ -14,11 +14,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-actuator") testImplementation("org.springframework.boot:spring-boot-starter-test") - - testImplementation(platform("org.testcontainers:testcontainers-bom:1.20.1")) testImplementation("org.testcontainers:junit-jupiter") testImplementation("org.testcontainers:postgresql") testImplementation("org.testcontainers:testcontainers") - - testImplementation("org.springframework.boot:spring-boot-testcontainers") } diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 734c508..bd63e68 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -33,6 +33,7 @@ subprojects { the().apply { imports { mavenBom(SpringBootPlugin.BOM_COORDINATES) + mavenBom("org.testcontainers:testcontainers-bom:1.20.1") } } diff --git a/backend/gradle.properties b/backend/gradle.properties index 8c5fc5c..97f8878 100644 --- a/backend/gradle.properties +++ b/backend/gradle.properties @@ -1,3 +1,4 @@ org.gradle.caching=true org.gradle.parallel=true org.gradle.configuration-cache=true + diff --git a/backend/initializationError b/backend/initializationError new file mode 100644 index 0000000..e69de29 From 96e7b69650c3f3c850415ad81eee4fa94b4876fe Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 04:33:42 -0700 Subject: [PATCH 06/19] chore(backend): Enable health checks for database and redis in both api and worker modules. --- backend/apps/api/src/main/resources/application.yml | 6 ++---- backend/apps/worker/src/main/resources/application.yml | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/apps/api/src/main/resources/application.yml b/backend/apps/api/src/main/resources/application.yml index 575f5b3..bfee8e5 100644 --- a/backend/apps/api/src/main/resources/application.yml +++ b/backend/apps/api/src/main/resources/application.yml @@ -21,9 +21,7 @@ management: exposure: include: health,info health: - defaults: + db: enabled: true redis: - enabled: false - db: - enabled: false + enabled: true diff --git a/backend/apps/worker/src/main/resources/application.yml b/backend/apps/worker/src/main/resources/application.yml index af26b79..707821c 100644 --- a/backend/apps/worker/src/main/resources/application.yml +++ b/backend/apps/worker/src/main/resources/application.yml @@ -23,4 +23,9 @@ management: endpoint: health: probes: - enabled: true \ No newline at end of file + enabled: true + health: + db: + enabled: true + redis: + enabled: true \ No newline at end of file From 4b4268defabfa57c0bdf18fc4735c24fd9712d7e Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 05:00:06 -0700 Subject: [PATCH 07/19] chore(docker): improve postgres setup with volumes and healthchecks - Add named volume for database persistence to prevent data loss. - Add pg_isready healthcheck for service readiness. - Sync postgres image tag to 16-alpine for consistency with integration tests. --- backend/compose.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/compose.yaml b/backend/compose.yaml index 945c535..4b89337 100644 --- a/backend/compose.yaml +++ b/backend/compose.yaml @@ -1,14 +1,24 @@ services: postgres: - image: postgres:16 + image: postgres:16-alpine environment: POSTGRES_USER: user POSTGRES_PASSWORD: password POSTGRES_DB: cleat_db ports: - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U user"] + interval: 5s + timeout: 5s + retries: 5 redis: image: redis:7 ports: - - "6379:6379" \ No newline at end of file + - "6379:6379" + +volumes: + postgres_data: \ No newline at end of file From 164131c666544f1d14d6497ad7213d4af486408b Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 07:01:07 -0700 Subject: [PATCH 08/19] chore(backend): configure environment variables and dynamic database connectivity - Setup .env and .env.example for centralized config - Updated .gitignore to exclude sensitive .env file - Refactored docker-compose and application.yml files to use environment variables for DB and Redis connections --- .env.example | 9 +++++++++ backend/apps/api/src/main/resources/application.yml | 10 +++++----- .../apps/worker/src/main/resources/application.yml | 12 ++++++------ backend/compose.yaml | 8 ++++---- 4 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..cc1ec9a --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +POSTGRES_USER=cleat +POSTGRES_PASSWORD=password +POSTGRES_DB=cleat_db + +DB_USERNAME=cleat +DB_PASSWORD=password +DB_NAME=cleat_db +DB_HOST=localhost +REDIS_HOST=localhost \ No newline at end of file diff --git a/backend/apps/api/src/main/resources/application.yml b/backend/apps/api/src/main/resources/application.yml index bfee8e5..bb53f54 100644 --- a/backend/apps/api/src/main/resources/application.yml +++ b/backend/apps/api/src/main/resources/application.yml @@ -2,14 +2,14 @@ spring: application: name: cleat-api datasource: - url: jdbc:postgresql://localhost:5432/cleat_db - username: user - password: password + url: jdbc:postgresql://${DB_HOST:localhost}:5432/${DB_NAME:cleat_db} + username: ${DB_USERNAME:cleat} + password: ${DB_PASSWORD:password} driver-class-name: org.postgresql.Driver data: redis: - host: localhost + host: ${REDIS_HOST:localhost} port: 6379 server: @@ -24,4 +24,4 @@ management: db: enabled: true redis: - enabled: true + enabled: true \ No newline at end of file diff --git a/backend/apps/worker/src/main/resources/application.yml b/backend/apps/worker/src/main/resources/application.yml index 707821c..ce6f2f6 100644 --- a/backend/apps/worker/src/main/resources/application.yml +++ b/backend/apps/worker/src/main/resources/application.yml @@ -2,15 +2,15 @@ spring: application: name: cleat-worker datasource: - url: jdbc:postgresql://localhost:5432/cleat_db - username: user - password: password + url: jdbc:postgresql://${DB_HOST:localhost}:5432/${DB_NAME:cleat_db} + username: ${DB_USERNAME:cleat} + password: ${DB_PASSWORD:password} driver-class-name: org.postgresql.Driver data: - redis: - host: localhost - port: 6379 + redis: + host: ${REDIS_HOST:localhost} + port: 6379 server: port: 8081 diff --git a/backend/compose.yaml b/backend/compose.yaml index 4b89337..680292c 100644 --- a/backend/compose.yaml +++ b/backend/compose.yaml @@ -2,15 +2,15 @@ services: postgres: image: postgres:16-alpine environment: - POSTGRES_USER: user - POSTGRES_PASSWORD: password - POSTGRES_DB: cleat_db + POSTGRES_USER: ${POSTGRES_USER:-cleat} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} + POSTGRES_DB: ${POSTGRES_DB:-cleat_db} ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U user"] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cleat}"] interval: 5s timeout: 5s retries: 5 From e436601e355d6d9be1fd6ddff464be6ae362773c Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 07:21:02 -0700 Subject: [PATCH 09/19] docs(backend): update readme with clear instructions for docker and gradle usage --- backend/.gitignore | 2 ++ backend/README.md | 32 ++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/backend/.gitignore b/backend/.gitignore index 0f76f6e..e2450b4 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -13,3 +13,5 @@ build/ # Local env *.local application-local.yml +.env + diff --git a/backend/README.md b/backend/README.md index 02fee9f..d7cbf46 100644 --- a/backend/README.md +++ b/backend/README.md @@ -61,27 +61,31 @@ Local dependencies (Postgres, Redis) are expected to run via Docker Compose. The two services build into one container image each. -## Docker Setup +# Docker Setup -This project uses Docker Compose to orchestrate the backend services, including the API, Worker, PostgreSQL database, and Redis cache. +This project uses Docker Compose to orchestrate infrastructure services (PostgreSQL and Redis), while the API and Worker modules are managed via Gradle. -### Prerequisites +## Prerequisites -- [Docker](https://www.docker.com/) -- [Docker Compose](https://docs.docker.com/compose/) +* Docker +* Docker Compose -### Getting Started +## Getting Started Navigate to the `backend` directory and use the following commands: -1. **Start the Services:** - docker compose up -d +### 1. Infrastructure (Docker) +Start the PostgreSQL and Redis containers: +`docker compose up -d` -2. **Verify Service Status:** - docker compose ps +### 2. Running the Application (Gradle) +Use Gradle to run the modules: -3. **Stop the Services:** - docker compose down +* For the API module: `./gradlew :apps:api:bootRun` +* For the Worker module: `./gradlew :apps:worker:bootRun` -### Configuration -The environment-specific configurations are managed within the `application.yml` files located in each module (`api` and `worker`). \ No newline at end of file +> **Note:** Running integration tests locally requires the Docker containers to be up and running. + +## Configuration + +Environment-specific configurations are managed within the `application.yml` files located in each module (api and worker). \ No newline at end of file From aec5807440399d67e7edb6318a1c108407649780 Mon Sep 17 00:00:00 2001 From: nurlanakberli9-pixel Date: Sat, 13 Jun 2026 07:43:52 -0700 Subject: [PATCH 10/19] fix(deps): add spring-boot-testcontainers dependency for integration tests --- backend/apps/api/build.gradle.kts | 1 + backend/apps/worker/build.gradle.kts | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/apps/api/build.gradle.kts b/backend/apps/api/build.gradle.kts index 3c648f5..2d4da1d 100644 --- a/backend/apps/api/build.gradle.kts +++ b/backend/apps/api/build.gradle.kts @@ -18,4 +18,5 @@ dependencies { testImplementation("org.testcontainers:junit-jupiter") testImplementation("org.testcontainers:postgresql") testImplementation("org.testcontainers:testcontainers") + testImplementation("org.springframework.boot:spring-boot-testcontainers") } diff --git a/backend/apps/worker/build.gradle.kts b/backend/apps/worker/build.gradle.kts index 4c98c92..4ae7e15 100644 --- a/backend/apps/worker/build.gradle.kts +++ b/backend/apps/worker/build.gradle.kts @@ -17,4 +17,5 @@ dependencies { testImplementation("org.testcontainers:junit-jupiter") testImplementation("org.testcontainers:postgresql") testImplementation("org.testcontainers:testcontainers") + testImplementation("org.springframework.boot:spring-boot-testcontainers") } From 0f41b8f0343b1255344221ce935c517b4e32d921 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 06:35:26 -0700 Subject: [PATCH 11/19] Update application.yml --- backend/apps/api/src/main/resources/application.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/apps/api/src/main/resources/application.yml b/backend/apps/api/src/main/resources/application.yml index a34120b..183b0dd 100644 --- a/backend/apps/api/src/main/resources/application.yml +++ b/backend/apps/api/src/main/resources/application.yml @@ -1,7 +1,6 @@ spring: application: name: cleat-api - feature/4-docker-compose-setup datasource: url: jdbc:postgresql://${DB_HOST:localhost}:5432/${DB_NAME:cleat_db} username: ${DB_USERNAME:cleat} @@ -25,6 +24,5 @@ management: db: enabled: true redis: - feature/4-docker-compose-setup enabled: true From 4250c552eaf92f02bca65530cd34100c6c125020 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 06:42:07 -0700 Subject: [PATCH 12/19] Delete backend/docker --- backend/docker | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 backend/docker diff --git a/backend/docker b/backend/docker deleted file mode 100644 index e69de29..0000000 From 4b0c3b1eea70c4d20890ddde176646c0010a7dcb Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 06:55:02 -0700 Subject: [PATCH 13/19] refactor: clean up files, README, and health configuration --- backend/apps/api/src/main/resources/application.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/apps/api/src/main/resources/application.yml b/backend/apps/api/src/main/resources/application.yml index 183b0dd..06bbefc 100644 --- a/backend/apps/api/src/main/resources/application.yml +++ b/backend/apps/api/src/main/resources/application.yml @@ -20,9 +20,12 @@ management: web: exposure: include: health,info + endpoint: + health: + probes: + enabled: true health: db: enabled: true redis: enabled: true - From e06d03472b2ea3720fc1b24b4ad1353a1c8f8d06 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 07:01:56 -0700 Subject: [PATCH 14/19] docs: update README (missed in previous commit) --- backend/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/README.md b/backend/README.md index d7cbf46..cad987b 100644 --- a/backend/README.md +++ b/backend/README.md @@ -57,8 +57,7 @@ for example `dev.cleat.domain` and `dev.cleat.githubclient`. ./gradlew build # build and test everything ``` -Local dependencies (Postgres, Redis) are expected to run via Docker Compose. The -two services build into one container image each. +Local dependencies (Postgres, Redis) are expected to run via Docker Compose, while the API and Worker services are intended to be run locally via Gradle # Docker Setup @@ -88,4 +87,4 @@ Use Gradle to run the modules: ## Configuration -Environment-specific configurations are managed within the `application.yml` files located in each module (api and worker). \ No newline at end of file +Environment-specific configurations are managed within the `application.yml` files located in each module (api and worker). From 07277198e3db54ab60a52dd6a68376cd9ad1f84c Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 07:38:18 -0700 Subject: [PATCH 15/19] Delete backend/initializationError,backend/Task,backend/There --- backend/initializationError | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 backend/initializationError diff --git a/backend/initializationError b/backend/initializationError deleted file mode 100644 index e69de29..0000000 From 2954736046ba2cecb872e9fbadf8d5d6a9de0c59 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Fri, 19 Jun 2026 07:40:13 -0700 Subject: [PATCH 16/19] Create .env.example --- backend/.env.example | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 backend/.env.example diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..ed85209 --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,9 @@ +POSTGRES_USER=cleat +POSTGRES_PASSWORD=password +POSTGRES_DB=cleat_db + +DB_USERNAME=cleat +DB_PASSWORD=password +DB_NAME=cleat_db +DB_HOST=localhost +REDIS_HOST=localhost From 18f48331c0958453a1dc02c1c2591dfea76fd208 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Sat, 20 Jun 2026 03:35:06 -0700 Subject: [PATCH 17/19] Delete backend/There,backed/Task --- backend/There | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 backend/There diff --git a/backend/There b/backend/There deleted file mode 100644 index e69de29..0000000 From 0c3ebfdb5096f6ccb168205b079992e5173a45e4 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Sat, 20 Jun 2026 03:40:30 -0700 Subject: [PATCH 18/19] Delete backend/Task --- backend/Task | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 backend/Task diff --git a/backend/Task b/backend/Task deleted file mode 100644 index e69de29..0000000 From 62890314d9e494327f3c036d458a383956c87f43 Mon Sep 17 00:00:00 2001 From: Nurlan Akbarov Date: Sat, 20 Jun 2026 07:51:40 -0700 Subject: [PATCH 19/19] Delete .env.example --- .env.example | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index cc1ec9a..0000000 --- a/.env.example +++ /dev/null @@ -1,9 +0,0 @@ -POSTGRES_USER=cleat -POSTGRES_PASSWORD=password -POSTGRES_DB=cleat_db - -DB_USERNAME=cleat -DB_PASSWORD=password -DB_NAME=cleat_db -DB_HOST=localhost -REDIS_HOST=localhost \ No newline at end of file