Skip to content

Commit

Permalink
add health endpoints, rename sync modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-coding committed Sep 2, 2024
1 parent 56d70fd commit 49ef0b5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
module:
- api-public
- api-internal
- github
- jira
- sync-github
- sync-jira
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
api-public
api-internal
sync
github
jira
sync-github
sync-jira
dest: "website/docs"
folder: "api"
- name: Install dependencies
Expand Down
24 changes: 18 additions & 6 deletions docker-compose-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
- LOGGING_LEVEL_IO_GITHUB_GRAPHGLUE=WARN
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/graphiql || exit 1
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
Expand All @@ -63,7 +63,7 @@ services:
- GROPIUS_CORE_CREATE_INDICES_ON_STARTUP=false
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/graphiql || exit 1
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
Expand Down Expand Up @@ -137,11 +137,11 @@ services:
volumes:
- mongo-data:/data/db
- mongo-config:/data/configdb
github:
sync-github:
build:
context: ./gropius-backend
args:
module: github
module: sync-github
depends_on:
- neo4j
- mongo
Expand All @@ -155,11 +155,17 @@ services:
- SPRING_DATA_MONGODB_PASSWORD=root
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=TODO_loginSecret
jira:
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
sync-jira:
build:
context: ./gropius-backend
args:
module: jira
module: sync-jira
depends_on:
- neo4j
- mongo
Expand All @@ -173,6 +179,12 @@ services:
- SPRING_DATA_MONGODB_PASSWORD=root
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=TODO_loginSecret
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s

volumes:
neo4j-conf:
Expand Down
24 changes: 18 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
- LOGGING_LEVEL_IO_GITHUB_GRAPHGLUE=WARN
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/graphiql || exit 1
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
Expand All @@ -60,7 +60,7 @@ services:
- GROPIUS_CORE_CREATE_INDICES_ON_STARTUP=false
- GRAPHGLUE_CORE_USE_NEO4J_PLUGIN=true
healthcheck:
test: wget -qO - http://localhost:8080/graphiql || exit 1
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
Expand Down Expand Up @@ -126,11 +126,11 @@ services:
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: $GROPIUS_MONGO_PASSWORD
github:
sync-github:
build:
context: ./gropius-backend
args:
module: github
module: sync-github
depends_on:
- neo4j
- mongo
Expand All @@ -146,11 +146,17 @@ services:
- SPRING_DATA_MONGODB_PASSWORD=$GROPIUS_MONGO_PASSWORD
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=$GROPIUS_SYNC_API_SECRET
jira:
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
sync-jira:
build:
context: ./gropius-backend
args:
module: jira
module: sync-jira
depends_on:
- neo4j
- mongo
Expand All @@ -166,6 +172,12 @@ services:
- SPRING_DATA_MONGODB_PASSWORD=$GROPIUS_MONGO_PASSWORD
- GROPIUS_SYNC_LOGIN_SERVICE_BASE=http://login-service:3000/
- GROPIUS_SYNC_API_SECRET=$GROPIUS_SYNC_API_SECRET
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s

volumes:
neo4j-conf:
Expand Down
2 changes: 1 addition & 1 deletion gropius-backend
Submodule gropius-backend updated 45 files
+4 −0 api-common/src/main/resources/application.yml
+2 −0 core/build.gradle.kts
+2 −2 settings.gradle.kts
+0 −0 sync-github/build.gradle.kts
+0 −0 sync-github/src/main/graphql/gropius/sync/github/CommentRead.graphql
+0 −0 sync-github/src/main/graphql/gropius/sync/github/CommonData.graphql
+0 −0 sync-github/src/main/graphql/gropius/sync/github/IssueMutation.graphql
+0 −0 sync-github/src/main/graphql/gropius/sync/github/IssueRead.graphql
+0 −0 sync-github/src/main/graphql/gropius/sync/github/IssueReadTimeline.graphql
+0 −0 sync-github/src/main/graphql/gropius/sync/github/schema.graphqls
+0 −0 sync-github/src/main/kotlin/gropius/Application.kt
+0 −0 sync-github/src/main/kotlin/gropius/GithubConfigurationProperties.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/CommentWalker.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/GitHubResourceWalkerConfig.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/GithubDataService.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/GithubResourceWalkerBudget.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/GithubSync.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/GithubTokenManager.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/IssuePile.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/IssueWalker.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/Scheduler.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/TimelineWalker.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/config/IMSConfig.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/config/IMSConfigManager.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/config/IMSProjectConfig.kt
+0 −0 sync-github/src/main/kotlin/gropius/sync/github/model/RepoDescription.kt
+4 −0 sync-github/src/main/resources/application.yml
+0 −0 sync-jira/build.gradle.kts
+0 −0 sync-jira/src/main/kotlin/gropius/Application.kt
+0 −0 sync-jira/src/main/kotlin/gropius/JiraConfigurationProperties.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/JiraDataService.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/JiraResourceWalkerBudget.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/JiraResourceWalkerConfig.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/JiraSync.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/JiraTokenManager.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/Scheduler.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/SyncStatus.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/config/IMSConfig.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/config/IMSConfigManager.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/config/IMSProjectConfig.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueData.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/model/IssueQuery.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/model/ProjectQuery.kt
+0 −0 sync-jira/src/main/kotlin/gropius/sync/jira/model/RepoDescription.kt
+4 −0 sync-jira/src/main/resources/application.yml

0 comments on commit 49ef0b5

Please sign in to comment.