Skip to content

Commit

Permalink
feature: init miranum-single-deployment-unit-example
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoesle committed Apr 10, 2024
1 parent 0ee1fde commit d823a22
Show file tree
Hide file tree
Showing 15 changed files with 1,917 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/workflow-build-and-release-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,13 @@ jobs:
push: true
tags: miragon/miranum-deployment-rest-example:${{ inputs.release-version }}
platforms: linux/amd64, linux/arm64/v8

# miranum-examples
- name: DOCKER / BUILD & PUBLISH / miragon/miranum-single-deployment-unit-example
if: inputs.docker-release == true
uses: docker/build-push-action@v5
with:
context: ./examples/single-deployment-unit-example/.
push: true
tags: miragon/miranum-single-deployment-unit-example:${{ inputs.release-version }}
platforms: linux/amd64, linux/arm64/v8
25 changes: 25 additions & 0 deletions .run/DeploymentEmbeddedExample.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="DeploymentEmbeddedExample" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="miranum-deployment-embedded-example" />
<option name="SPRING_BOOT_MAIN_CLASS" value="io.miranum.platform.deploymentserver.DeploymentEmbeddedExample" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="io.miranum.platform.deploymentserver.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<extension name="net.ashald.envfile">
<option name="IS_ENABLED" value="false" />
<option name="IS_SUBST" value="false" />
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
<option name="IS_IGNORE_MISSING_FILES" value="false" />
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
<ENTRIES>
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" />
</ENTRIES>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
19 changes: 19 additions & 0 deletions .run/DeploymentRestExample.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="DeploymentRestExample" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="miranum-deployment-rest-example" />
<option name="SPRING_BOOT_MAIN_CLASS" value="io.miranum.platform.deploymentservice.DeploymentRestExample" />
<extension name="net.ashald.envfile">
<option name="IS_ENABLED" value="false" />
<option name="IS_SUBST" value="false" />
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
<option name="IS_IGNORE_MISSING_FILES" value="false" />
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
<ENTRIES>
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" />
</ENTRIES>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
20 changes: 20 additions & 0 deletions .run/MiranumSingleDeploymentUnitExample.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="MiranumSingleDeploymentUnitExample" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="miranum-single-deployment-unit-example" />
<option name="SPRING_BOOT_MAIN_CLASS" value="io.miranum.platform.example.MiranumSingleDeploymentUnitExample" />
<extension name="net.ashald.envfile">
<option name="IS_ENABLED" value="true" />
<option name="IS_SUBST" value="false" />
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
<option name="IS_IGNORE_MISSING_FILES" value="false" />
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
<ENTRIES>
<ENTRY IS_ENABLED="true" PARSER="runconfig" IS_EXECUTABLE="false" />
<ENTRY IS_ENABLED="true" PARSER="env" IS_EXECUTABLE="false" PATH="examples/single-deployment-unit-example/local.env" />
</ENTRIES>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
23 changes: 23 additions & 0 deletions examples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.miranum.platform</groupId>
<artifactId>miranum</artifactId>
<version>0.3.1-SNAPSHOT</version>
</parent>

<artifactId>miranum-examples</artifactId>
<name>miranum-examples</name>
<modules>
<module>single-deployment-unit-example</module>
</modules>
<packaging>pom</packaging>

<dependencyManagement>

</dependencyManagement>

</project>
9 changes: 9 additions & 0 deletions examples/single-deployment-unit-example/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM amazoncorretto:17-alpine

EXPOSE 8080

RUN mkdir /app

COPY ./target/*.jar /app/spring-boot-application.jar

CMD ["java","-jar","/app/spring-boot-application.jar"]
5 changes: 5 additions & 0 deletions examples/single-deployment-unit-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Miranum Single Deployment Unit Example

> This examples shows how to use Miranum components to create a miranum-platform as a single spring boot application (single deployment unit).
![overview](../../images/Miranum-Platform-Single-Deployment.png)
1 change: 1 addition & 0 deletions examples/single-deployment-unit-example/local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MIRANUM_SINGLE_DEPLOYMENT_UNIT_EXAMPLE_PORT=8083
36 changes: 36 additions & 0 deletions examples/single-deployment-unit-example/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.miranum.platform</groupId>
<artifactId>miranum-examples</artifactId>
<version>0.3.1-SNAPSHOT</version>
</parent>

<artifactId>miranum-single-deployment-unit-example</artifactId>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.miranum.platform.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class MiranumSingleDeploymentUnitExample {

public static void main(final String[] args) {
SpringApplication.run(MiranumSingleDeploymentUnitExample.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server:
port: "${MIRANUM_SINGLE_DEPLOYMENT_UNIT_EXAMPLE_PORT:8080}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
███╗ ███╗██╗██████╗ █████╗ ███╗ ██╗██╗ ██╗███╗ ███╗
████╗ ████║██║██╔══██╗██╔══██╗████╗ ██║██║ ██║████╗ ████║
██╔████╔██║██║██████╔╝███████║██╔██╗ ██║██║ ██║██╔████╔██║
██║╚██╔╝██║██║██╔══██╗██╔══██║██║╚██╗██║██║ ██║██║╚██╔╝██║
██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ╚████║╚██████╔╝██║ ╚═╝ ██║
╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
Loading

0 comments on commit d823a22

Please sign in to comment.