This commit is contained in:
parent
45ca9b8615
commit
6ecb625a61
|
|
@ -15,25 +15,9 @@ services:
|
||||||
- spring-cloud-network
|
- spring-cloud-network
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
#service 2: definition of phpMyAdmin
|
|
||||||
phpmyadmin:
|
|
||||||
image: phpmyadmin/phpmyadmin:latest
|
|
||||||
container_name: my-php-myadmin
|
|
||||||
ports:
|
|
||||||
- "8082:80"
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
networks:
|
|
||||||
- spring-cloud-network
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
environment:
|
|
||||||
SPRING_DATASOURCE_USERNAME: root
|
|
||||||
SPRING_DATASOURCE_PASSWORD: 0cscadmin1
|
|
||||||
|
|
||||||
|
|
||||||
#service 3: definition of your spring-boot app
|
#service 3: definition of your spring-boot app
|
||||||
cfgserver: #it is just a name, which will be used only in this file.
|
restserver: #it is just a name, which will be used only in this file.
|
||||||
image: appserver-service #name of the image after dockerfile executes
|
image: appserver-service #name of the image after dockerfile executes
|
||||||
container_name: appserver-service-app #name of the container created from docker image
|
container_name: appserver-service-app #name of the container created from docker image
|
||||||
|
|
||||||
|
|
@ -55,8 +39,31 @@ services:
|
||||||
SPRING_JPA_HIBERNATE_DDL_AUTO: update
|
SPRING_JPA_HIBERNATE_DDL_AUTO: update
|
||||||
|
|
||||||
|
|
||||||
|
#service 3: definition of your spring-boot app
|
||||||
|
shellserver: #it is just a name, which will be used only in this file.
|
||||||
|
image: shellserver-service #name of the image after dockerfile executes
|
||||||
|
container_name: shellserver-service-app #name of the container created from docker image
|
||||||
|
|
||||||
|
build:
|
||||||
|
context: ./shell #docker file path (. means root directory)
|
||||||
|
dockerfile: Dockerfile #docker file name
|
||||||
|
ports:
|
||||||
|
- "8089:8082" #docker container port with your os port
|
||||||
|
restart: "no"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
- spring-cloud-network
|
||||||
|
depends_on: #define dependencies of this app
|
||||||
|
- db #dependency name (which is defined with this name 'db' in this file earlier)
|
||||||
|
environment:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/property?createDatabaseIfNotExist=false
|
||||||
|
SPRING_DATASOURCE_USERNAME: root
|
||||||
|
SPRING_DATASOURCE_PASSWORD: 0cscadmin1
|
||||||
|
SPRING_JPA_HIBERNATE_DDL_AUTO: update
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
spring-cloud-network:
|
spring-cloud-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
FROM openjdk:8-jdk-alpine
|
||||||
|
|
||||||
|
ARG JAR_FILE=target/*.jar
|
||||||
|
ARG JAR_DEPENDENDIES=target/alternateLocation
|
||||||
|
|
||||||
|
ARG DEPENDENCY=target/dependency
|
||||||
|
COPY ${JAR_FILE} app.jar
|
||||||
|
#EXPOSE 3999:3999
|
||||||
|
COPY ${JAR_DEPENDENDIES} ./
|
||||||
|
#RUN ls -al
|
||||||
|
ENTRYPOINT ["java","-jar","/app.jar"]
|
||||||
|
|
@ -14,11 +14,12 @@
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies><dependency>
|
<dependencies>
|
||||||
<groupId>${project.groupId}</groupId>
|
<dependency>
|
||||||
<artifactId>core</artifactId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<version>${project.version}</version>
|
<artifactId>core</artifactId>
|
||||||
</dependency>
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.shell</groupId>
|
<groupId>org.springframework.shell</groupId>
|
||||||
<artifactId>spring-shell-starter</artifactId>
|
<artifactId>spring-shell-starter</artifactId>
|
||||||
|
|
@ -71,7 +72,7 @@
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>${project.basedir}/../resources</directory>
|
<directory>${project.basedir}/../resources</directory>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -87,7 +88,27 @@
|
||||||
<useDefaultDelimiters>false</useDefaultDelimiters>
|
<useDefaultDelimiters>false</useDefaultDelimiters>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-dependencies</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
|
||||||
|
<overWriteReleases>false</overWriteReleases>
|
||||||
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||||||
|
<excludeTransitive>true</excludeTransitive>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jsonschema2pojo</groupId>
|
<groupId>org.jsonschema2pojo</groupId>
|
||||||
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
|
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
|
||||||
|
|
@ -56,6 +55,11 @@
|
||||||
<includeJsr305Annotations>false</includeJsr305Annotations>
|
<includeJsr305Annotations>false</includeJsr305Annotations>
|
||||||
<includeJsr303Annotations>false</includeJsr303Annotations>
|
<includeJsr303Annotations>false</includeJsr303Annotations>
|
||||||
<annotationStyle>none</annotationStyle>
|
<annotationStyle>none</annotationStyle>
|
||||||
|
<excludes>
|
||||||
|
<exclude>
|
||||||
|
.gitignore
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
|
@ -68,4 +72,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue