Skip to content

Commit

Permalink
Merge pull request #26 from stevensblueprint/feature/ci
Browse files Browse the repository at this point in the history
Fix: Service Network Connection
  • Loading branch information
miguel-merlin authored Dec 12, 2024
2 parents 8ea4f3e + 74e6a9b commit e6787e7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ FROM openjdk:17-jdk-alpine
WORKDIR /app
COPY --from=build /app/target/orservice-0.0.1-SNAPSHOT.jar app-1.0.0.jar
EXPOSE 8080
ENTRYPOINT [ "java", "-jar", "app-1.0.0.jar", "-Dspring.profiles.active=prod" ]
ENTRYPOINT [ "java", "-jar", "-Dspring.profiles.active=prod", "app-1.0.0.jar"]
11 changes: 6 additions & 5 deletions docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
expose:
- "5432"
networks:
orservice:
orservice_network:
ipv4_address: 10.10.2.2
environment:
- POSTGRES_USER=${POSTGRES_USER}
Expand Down Expand Up @@ -37,7 +37,7 @@ services:
expose:
- "8080"
networks:
orservice:
orservice_network:
ipv4_address: 10.10.2.3
environment:
- ORSERVICE_DB_HOST=orservice_db
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
ports:
- "80:5173"
networks:
orservice:
orservice_network:
ipv4_address: 10.10.2.4
logging:
options:
Expand All @@ -89,9 +89,10 @@ volumes:
postgres-data:

networks:
orservice:
orservice_network:
driver: bridge
name: orservice_network
ipam:
config:
- subnet: 10.10.2.0/24
gateway: 10.10.2.1
gateway: 10.10.2.1
3 changes: 2 additions & 1 deletion src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
app.environment=local
app.environment=dev
spring.datasource.url=jdbc:postgresql://localhost:5432/orservice_db
8 changes: 1 addition & 7 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
app.environment=prod
server.port=8080
spring.security.oauth2.client.registration.cognito.client-id = {your-app-client-id}
spring.security.oauth2.client.registration.cognito.client-secret = {your-app-client-secret}
spring.security.oauth2.client.registration.cognito.scope = openid
spring.security.oauth2.client.registration.cognito.redirect-uri = http://localhost:8080/login/oauth2/code/cognito
spring.security.oauth2.client.registration.cognito.clientName = {your-app-client-name}
spring.security.oauth2.client.registration.cognito.authorization-grant-type=authorization_code
spring.security.oauth2.client.provider.cognito.issuerUri = https://cognito-idp.{your-user-pool-region}.amazonaws.com/{user-pool-id}
spring.datasource.url=jdbc:postgresql://orservice_db:5432/orservice_db
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring.application.name=orservice
spring.datasource.url=jdbc:postgresql://localhost:5432/orservice_db
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=update
Expand Down

0 comments on commit e6787e7

Please sign in to comment.