Skip to content

Commit

Permalink
Merge pull request #42 from MichiBaum/develop
Browse files Browse the repository at this point in the history
Develop (Test SSL)
  • Loading branch information
MichiBaum authored Oct 26, 2024
2 parents dfac982 + 7521b40 commit 43904cf
Show file tree
Hide file tree
Showing 38 changed files with 402 additions and 852 deletions.
8 changes: 6 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
SPRING_ACTIVE_PROFILES=prod
SSL_KEYSTORE_PASSWORD=PleaseChangeMe

DISCORD_BOT_TOKEN=PleaseChangeMe
DISCORD_GUILD_ID=PleaseChangeMe
DISCORD_REGISTRY_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_USERMANAGEMENT_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_WEBSITE_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_JAVADOC_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_CHESS_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_GATEWAY_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_AUTHENTICATION_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_ADMIN_SERVICE_LOG_CHANNEL=PleaseChangeMe
DISCORD_FITNESS_SERVICE_LOG_CHANNEL=PleaseChangeMe

USERMANAGEMENT_DB_PASSWORD=PleaseChangeMe
USERMANAGEMENT_DB=usermanagement
Expand All @@ -18,4 +19,7 @@ AUTHENTICATION_DB_PASSWORD=PleaseChangeMe
AUTHENTICATION_DB=authentication

CHESS_DB_PASSWORD=PleaseChangeMe
CHESS_DB=chess
CHESS_DB=chess

FITNESS_DB_PASSWORD=PleaseChangeMe
FITNESS_DB=fitness
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'

- name: Set up node
uses: actions/setup-node@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@ There are these microservices:
- [Admin Service](./admin-service/README.md)
- [Authentication Service](./authentication-service/README.md)
- [Gateway Service](./gateway-service/README.md)
- [Javadoc Service](./javadoc-service/README.md)
- [Registry Service](./registry-service/README.md)
- [Usermanagement Service](./usermanagement-service/README.md)
- [Website Service](./website-service/README.md)
- [Chess Service](./chess-service/README.md)
- [Fitness Service](./fitness-service/README.md)

And these libraries
And these libraries:
- [Authentication Library](./authentication-library/README.md)
- [Permission Library](./permission-library/README.md)
- [Usermanagement Library](./usermanagement-library/README.md)
- [Spring Boot Starter Discord](./spring-boot-starter-discord/README.md)

And these databases:
- Authentication DB
- Usermanagement DB
- Chess DB
- Fitness DB

## Release

### Maven release plugin
Expand All @@ -41,10 +47,6 @@ And these libraries

## Docker

### Build JavaDoc

mvnw javadoc:aggregate

### Container

#### Up
Expand Down Expand Up @@ -76,7 +78,6 @@ In *C:\Windows\System32\drivers\etc* find file *hosts* and add those lines:
127.0.0.1 gateway.michibaum.ch
127.0.0.1 registry.michibaum.ch
127.0.0.1 admin.michibaum.ch
127.0.0.1 javadoc.michibaum.ch
127.0.0.1 usermanagement.michibaum.ch
127.0.0.1 authentication.michibaum.ch
127.0.0.1 michibaum.ch
Expand Down
12 changes: 12 additions & 0 deletions admin-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
server:
port: 80
ssl:
bundle: “web-server”
client-auth: WANT

spring:
microservices:
Expand All @@ -14,6 +17,15 @@ spring:
admin:
ui:
public-url: http://admin.michibaum.ch
ssl:
bundle:
jks:
web-server:
key:
alias: "michibaum"
keystore:
location: "/data/ssl/keystore.p12"
password: ${SSL_KEYSTORE_PASSWORD}

eureka:
client:
Expand Down
14 changes: 14 additions & 0 deletions authentication-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
server:
port: 80
ssl:
bundle: “web-server”
client-auth: WANT

spring:
microservices:
Expand All @@ -10,6 +13,17 @@ spring:
logging:
enabled: true
channel-id: ${DISCORD_AUTHENTICATION_SERVICE_LOG_CHANNEL}
ssl:
bundle:
jks:
web-server:
key:
alias: "michibaum"
keystore:
location: "/data/ssl/keystore.p12"
password: ${SSL_KEYSTORE_PASSWORD}



eureka:
client:
Expand Down
12 changes: 12 additions & 0 deletions chess-service/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
server:
port: 80
ssl:
bundle: “web-server”
client-auth: WANT

spring:
microservices:
Expand All @@ -10,6 +13,15 @@ spring:
logging:
enabled: true
channel-id: ${DISCORD_CHESS_SERVICE_LOG_CHANNEL}
ssl:
bundle:
jks:
web-server:
key:
alias: "michibaum"
keystore:
location: "/data/ssl/keystore.p12"
password: ${SSL_KEYSTORE_PASSWORD}

eureka:
client:
Expand Down
82 changes: 59 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
expose:
- "8761"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand All @@ -35,29 +37,8 @@ services:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
expose:
- "80"
networks:
- microservice-network
deploy:
resources:
limits:
cpus: '0.50'
memory: 500M
reservations:
cpus: '0.20'
memory: 250M

javadoc-service:
image: 70131370/javadoc-service
env_file:
- .env
- .env.override
restart: always
depends_on:
- registry-service
environment:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand All @@ -83,6 +64,8 @@ services:
DATABASE: ${AUTHENTICATION_DB}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand Down Expand Up @@ -125,6 +108,8 @@ services:
DATABASE: ${USERMANAGEMENT_DB}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand Down Expand Up @@ -164,6 +149,9 @@ services:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
ports:
- "80:80"
- "443:80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand All @@ -187,6 +175,8 @@ services:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand All @@ -213,6 +203,8 @@ services:
DATABASE: ${CHESS_DB}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
Expand Down Expand Up @@ -240,6 +232,50 @@ services:
networks:
- microservice-network

fitness-service:
image: 70131370/fitness-service
env_file:
- .env
- .env.override
restart: always
depends_on:
- registry-service
- fitness-db
environment:
spring_profiles_active: ${SPRING_ACTIVE_PROFILES}
DATABASE_PASSWORD: ${FITNESS_DB_PASSWORD}
DATABASE: ${FITNESS_DB}
expose:
- "80"
volumes:
- /data/ssl:/data/ssl
networks:
- microservice-network
deploy:
resources:
limits:
cpus: '0.50'
memory: 500M
reservations:
cpus: '0.20'
memory: 250M

fitness-db:
image: mysql:9.0
env_file:
- .env
- .env.override
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${FITNESS_DB_PASSWORD}
MYSQL_DATABASE: ${FITNESS_DB}
expose:
- "3306"
volumes:
- /data/fitness-db:/var/lib/mysql
networks:
- microservice-network

# Matomo
# https://medium.com/@davquar/matomo-lets-install-it-with-docker-512211705c76
# https://github.com/matomo-org/docker
Expand Down
1 change: 1 addition & 0 deletions fitness-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Fitness Service
Loading

0 comments on commit 43904cf

Please sign in to comment.