-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Omid Mohkamkar
committed
Apr 30, 2024
1 parent
dc2a609
commit cd176dc
Showing
6 changed files
with
56 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM maven:3.8.3-openjdk-17 AS build | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy the source code | ||
COPY ./iam-api . | ||
|
||
# Build the project | ||
RUN mvn clean package -DskipTests | ||
|
||
# Create the final image with the built JAR file | ||
FROM openjdk:17-jdk-slim | ||
|
||
# Set the working directory | ||
WORKDIR /opt/iam-aas | ||
|
||
# Copy the JAR file | ||
COPY --from=build /app/target/iam-api-2.0.2.jar ./application.jar | ||
|
||
# Expose the port | ||
EXPOSE 8000 | ||
|
||
# Run the application | ||
ENTRYPOINT ["java", "-jar", "./application.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ services: | |
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=iam-password | ||
ports: | ||
- "5432" | ||
- "5432:5432" | ||
healthcheck: | ||
test: "pg_isready -U postgres" | ||
|
||
|
@@ -51,15 +51,22 @@ services: | |
labels: | ||
org.springframework.boot.ignore: true | ||
|
||
pgadmin-main: | ||
image: dpage/pgadmin4 | ||
iam-api: | ||
image: omidmk567/iam-aas:1.0.0 | ||
container_name: iam-api | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: [email protected] | ||
PGADMIN_DEFAULT_PASSWORD: admin | ||
- SPRING_DATASOURCE_URL=jdbc:postgresql://iam-postgres:5432/iam | ||
- SPRING_DATASOURCE_USERNAME=postgres | ||
- SPRING_DATASOURCE_PASSWORD=iam-password | ||
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver | ||
- APP_IAM_AAS_KEYCLOAK_BASE_URL=http://keycloak:8080 | ||
- APP_IAM_AAS_KEYCLOAK_MASTER_REALM=master | ||
- APP_IAM_AAS_KEYCLOAK_MASTER_USERNAME=admin | ||
- APP_IAM_AAS_KEYCLOAK_MASTER_PASSWORD=admin | ||
- APP_IAM_AAS_KEYCLOAK_MASTER_CLIENT_ID=admin-cli | ||
- APP_IAM_AAS_KEYCLOAK_AUTH_REALM=IAM-aaS | ||
depends_on: | ||
- keycloak-db | ||
- iam-api-db | ||
- keycloak | ||
ports: | ||
- '5051:80' | ||
labels: | ||
org.springframework.boot.ignore: true | ||
- "8000:8000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM openjdk:17-jdk-slim | ||
|
||
# Set the working directory | ||
WORKDIR /opt/iam-aas | ||
|
||
# Copy the JAR file | ||
COPY ./target/iam-api-2.0.2.jar ./application.jar | ||
|
||
# Expose the port | ||
EXPOSE 8000 | ||
|
||
# Run the application | ||
ENTRYPOINT ["java", "-jar", "./application.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters