Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrofpk committed Feb 13, 2020
1 parent 9d4c5e8 commit f49404b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM openjdk:8-jdk-alpine
VOLUME /tmp
EXPOSE 8091
ADD target/*.jar app.jar
ENV JAVA_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
</dependencies>

<build>
<finalName>beacon-input</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand All @@ -78,7 +79,26 @@
<executable>true</executable>
</configuration>
</plugin>
<!-- Docker -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.10</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<!-- <goal>push</goal> -->
</goals>
</execution>
</executions>
<configuration>
<repository>lpcorrea/${project.name}</repository>
<tag>${project.version}</tag>
<skipDockerInfo>true</skipDockerInfo>
</configuration>
</plugin>
</plugins>
</build>

</project>
9 changes: 5 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ info.app.description=Input data
info.app.version=1.0.0.0-rc1

#Database
spring.datasource.url=jdbc:mysql://localhost/beacon-input?useSSL=false&useTimezone=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.url=jdbc:mysql://${RDS_HOSTNAME:localhost}:${RDS_PORT:3306}/${RDS_DB_NAME:beacon_input}?useSSL=false&useTimezone=false&serverTimezone=UTC
spring.datasource.username=${RDS_USERNAME:root}
spring.datasource.password=${RDS_PASSWORD:123456}

spring.jpa.hibernate.ddl-auto=validate

#hibernate
Expand All @@ -26,7 +27,7 @@ logging.level.root=warn
spring.jpa.open-in-view=false

#queue
spring.rabbitmq.host=localhost
spring.rabbitmq.host=${BEACON_RABBIT_HOSTNAME:localhost}
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
Expand Down

0 comments on commit f49404b

Please sign in to comment.