Skip to content

Commit

Permalink
complete setup of catalog service module
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwell-balla committed Nov 23, 2024
1 parent f2ea8a7 commit 1efb039
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/catalog-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Catalog Service

on:
push:
paths:
- catalog-service/**
branches:
- '**'
pull_request:
branches: [master]

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
working-directory: ./catalog-service
defaults:
run:
working-directory: ${{ env.working-directory }}
steps:
- uses: actions/checkout@v4

- name: Setup Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

- name: Make Maven wrapper executable
run: chmod +x mvnw

- name: Build with Maven
run: ./mvnw -ntp verify
6 changes: 5 additions & 1 deletion catalog-service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ spring.application.name=catalog-service
server.port=8581
server.shutdown=graceful
management.endpoints.web.exposure.include=*
management.info.git.mode=full
management.info.git.mode=full

spring.datasource.url=${DB_URL:jdbc:postgresql://localhost:15432/postgres}
spring.datasource.username=${DB_USERNAME:postgres}
spring.datasource.password=${DB_PASSWORD:postgres}
21 changes: 21 additions & 0 deletions deployment/docker-compose/infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.8"
name: "bookstore"
services:
catalog-db:
image: postgres:16-alpine
container_name: catalog-db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "15432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 500m

0 comments on commit 1efb039

Please sign in to comment.