Skip to content

Commit

Permalink
- Added dev & prod properties
Browse files Browse the repository at this point in the history
- Update properties
  • Loading branch information
MichiBaum committed Dec 10, 2023
1 parent 87e17f8 commit 575e389
Show file tree
Hide file tree
Showing 25 changed files with 140 additions and 40 deletions.
7 changes: 5 additions & 2 deletions admin-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@
<excludeDevtools>true</excludeDevtools>
<optimizedLaunch>true</optimizedLaunch>
<image>
<!--suppress UnresolvedMavenProperty -->
<name>registry.hub.docker.com/${dockerHub.username}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
</image>
<docker>
<publishRegistry>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
<!--suppress UnresolvedMavenProperty -->
<password>${dockerHub.password}</password>
<url>${dockerHub.url}</url>
</publishRegistry>
Expand All @@ -98,8 +101,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
Expand Down
13 changes: 13 additions & 0 deletions admin-service/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
server:
port: 8082

spring:
boot:
admin:
ui:
public-url: http://localhost:8082

eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
13 changes: 13 additions & 0 deletions admin-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
server:
port: 80

spring:
boot:
admin:
ui:
public-url: http://admin.michibaum.ch

eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
5 changes: 0 additions & 5 deletions admin-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ spring:
enabled: true
ui:
title: Admin Server
# Public URL because of Gateway
public-url: http://admin.michibaum.ch
monitor:
status-interval: 3s
status-lifetime: 3s
Expand All @@ -33,9 +31,6 @@ spring:
allow-bean-definition-overriding: true

eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
instance:
prefer-ip-address: true

Expand Down
11 changes: 9 additions & 2 deletions authentication-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -101,12 +105,15 @@
<excludeDevtools>true</excludeDevtools>
<optimizedLaunch>true</optimizedLaunch>
<image>
<!--suppress UnresolvedMavenProperty -->
<name>registry.hub.docker.com/${dockerHub.username}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
</image>
<docker>
<publishRegistry>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
<!--suppress UnresolvedMavenProperty -->
<password>${dockerHub.password}</password>
<url>${dockerHub.url}</url>
</publishRegistry>
Expand All @@ -122,8 +129,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
Expand Down
7 changes: 7 additions & 0 deletions authentication-service/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server:
port: 8083

eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server:
port: 80

eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
3 changes: 0 additions & 3 deletions authentication-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ spring:
dll-auto: update

eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
instance:
prefer-ip-address: true

Expand Down
23 changes: 18 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
registry-service:
image: 70131370/registry-service:1.0.0-TEST-4
restart: always
environment:
spring_profiles_active: prod
expose:
- "8761"
networks:
Expand All @@ -15,8 +17,10 @@ services:
restart: always
depends_on:
- registry-service
environment:
spring_profiles_active: prod
expose:
- "8080"
- "80"
networks:
- microservice-network

Expand All @@ -25,8 +29,10 @@ services:
restart: always
depends_on:
- registry-service
environment:
spring_profiles_active: prod
expose:
- "8080"
- "80"
networks:
- microservice-network

Expand All @@ -35,15 +41,18 @@ services:
restart: always
depends_on:
- registry-service
environment:
spring_profiles_active: prod
expose:
- "8080"
- "80"
networks:
- microservice-network

authentication-db:
image: mysql:8.0
restart: always
environment:
spring_profiles_active: prod
MYSQL_ROOT_PASSWORD: ${AUTHENTICATION_DB_PASSWORD}
MYSQL_DATABASE: ${AUTHENTICATION_DB}
expose:
Expand All @@ -57,18 +66,20 @@ services:
depends_on:
- registry-service
- usermanagement-db
expose:
- "8080"
environment:
spring_profiles_active: prod
DATABASE_PASSWORD: ${USERMANAGEMENT_DB_PASSWORD}
DATABASE: ${USERMANAGEMENT_DB}
expose:
- "80"
networks:
- microservice-network

usermanagement-db:
image: mysql:8.0
restart: always
environment:
spring_profiles_active: prod
MYSQL_ROOT_PASSWORD: ${USERMANAGEMENT_DB_PASSWORD}
MYSQL_DATABASE: ${USERMANAGEMENT_DB}
expose:
Expand All @@ -87,6 +98,8 @@ services:
- admin-service
ports:
- "80:80"
environment:
spring_profiles_active: prod
expose:
- "80"
networks:
Expand Down
7 changes: 5 additions & 2 deletions gateway-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@
<excludeDevtools>true</excludeDevtools>
<optimizedLaunch>true</optimizedLaunch>
<image>
<!--suppress UnresolvedMavenProperty -->
<name>registry.hub.docker.com/${dockerHub.username}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
</image>
<docker>
<publishRegistry>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
<!--suppress UnresolvedMavenProperty -->
<password>${dockerHub.password}</password>
<url>${dockerHub.url}</url>
</publishRegistry>
Expand All @@ -92,8 +95,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
Expand Down
4 changes: 4 additions & 0 deletions gateway-service/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
4 changes: 4 additions & 0 deletions gateway-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
3 changes: 0 additions & 3 deletions gateway-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ spring:


eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
instance:
prefer-ip-address: true

Expand Down
7 changes: 5 additions & 2 deletions javadoc-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@
<excludeDevtools>true</excludeDevtools>
<optimizedLaunch>true</optimizedLaunch>
<image>
<!--suppress UnresolvedMavenProperty -->
<name>registry.hub.docker.com/${dockerHub.username}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
</image>
<docker>
<publishRegistry>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
<!--suppress UnresolvedMavenProperty -->
<password>${dockerHub.password}</password>
<url>${dockerHub.url}</url>
</publishRegistry>
Expand All @@ -93,8 +96,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
Expand Down
7 changes: 7 additions & 0 deletions javadoc-service/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server:
port: 8081

eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
7 changes: 7 additions & 0 deletions javadoc-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server:
port: 80

eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
3 changes: 0 additions & 3 deletions javadoc-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ spring:


eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
instance:
prefer-ip-address: true

Expand Down
7 changes: 5 additions & 2 deletions registry-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@
<excludeDevtools>true</excludeDevtools>
<optimizedLaunch>true</optimizedLaunch>
<image>
<!--suppress UnresolvedMavenProperty -->
<name>registry.hub.docker.com/${dockerHub.username}/${project.artifactId}:${project.version}</name>
<publish>true</publish>
</image>
<docker>
<publishRegistry>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
<!--suppress UnresolvedMavenProperty -->
<password>${dockerHub.password}</password>
<url>${dockerHub.url}</url>
</publishRegistry>
Expand All @@ -94,8 +97,8 @@
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
Expand Down
4 changes: 4 additions & 0 deletions registry-service/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka
4 changes: 4 additions & 0 deletions registry-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eureka:
client:
service-url:
defaultZone: http://registry-service:8761/eureka
2 changes: 0 additions & 2 deletions registry-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ eureka:
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://registry-service:8761/eureka

management:
endpoints:
Expand Down
Loading

0 comments on commit 575e389

Please sign in to comment.