Spring bean reflection
This commit is contained in:
parent
134a1e887f
commit
f71184fe95
20
Dockerfile
20
Dockerfile
@ -1,8 +1,24 @@
|
|||||||
FROM openjdk:8-jdk-alpine
|
FROM openjdk:8-jdk-alpine
|
||||||
MAINTAINER Loafle <rnd@loafle.com>
|
MAINTAINER Loafle <rnd@loafle.com>
|
||||||
|
|
||||||
ARG APP_FILENAME="com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"
|
ENV APP_FILENAME="com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"
|
||||||
|
|
||||||
|
ADD docker/bin/*.sh /opt/bin/
|
||||||
|
|
||||||
|
RUN apk add --no-cache curl \
|
||||||
|
&& chmod +x /opt/bin/*.sh
|
||||||
|
|
||||||
ADD target/lib /service/lib
|
ADD target/lib /service/lib
|
||||||
ADD target/com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar /service/
|
ADD target/com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar /service/
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/java", "-jar", "/service/com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"]
|
ENV TINI_VERSION='0.14.0' \
|
||||||
|
TINI_SHA='6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd'
|
||||||
|
|
||||||
|
# Use tini as subreaper in Docker container to adopt zombie processes
|
||||||
|
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
|
||||||
|
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
|
||||||
|
|
||||||
|
|
||||||
|
EXPOSE 50006
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/tini", "--", "/opt/bin/docker-entrypoint.sh"]
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# overFlow-dao:
|
overFlow-server:
|
||||||
# restart: always
|
restart: always
|
||||||
# build: ./
|
image: docker.loafle.net/overflow/overflow_server:1.0.0-SNAPSHOT
|
||||||
# container_name: overFlow-dao
|
container_name: overFlow-server
|
||||||
# volumes:
|
ports:
|
||||||
# ports:
|
- "50006:50006"
|
||||||
# - "9080:80"
|
|
||||||
|
|
||||||
postgresql:
|
# postgresql:
|
||||||
restart: always
|
# restart: always
|
||||||
image: postgres:9.6-alpine
|
# image: postgres:9.6-alpine
|
||||||
container_name: overFlow-dao-postgres
|
# container_name: overFlow-dao-postgres
|
||||||
environment:
|
# environment:
|
||||||
- POSTGRES_DB=overflow
|
# - POSTGRES_DB=overflow
|
||||||
- POSTGRES_USER=overflow
|
# - POSTGRES_USER=overflow
|
||||||
- POSTGRES_PASSWORD=qwer5795
|
# - POSTGRES_PASSWORD=qwer5795
|
||||||
# - POSTGRES_INITDB_ARGS="--data-checksums"
|
# # - POSTGRES_INITDB_ARGS="--data-checksums"
|
||||||
ports:
|
# ports:
|
||||||
- "5432:5432"
|
# - "5432:5432"
|
||||||
|
|
||||||
# docker-compose up -d
|
# docker-compose up -d
|
||||||
# docker-compose stop
|
# docker-compose stop
|
||||||
|
11
docker/bin/docker-entrypoint.sh
Normal file
11
docker/bin/docker-entrypoint.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd /service
|
||||||
|
|
||||||
|
#/usr/bin/java -cp lib/*.jar -jar "com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar" 50006
|
||||||
|
|
||||||
|
/usr/bin/java -cp com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar:lib/* com.loafle.overflow.OFMain 50006
|
||||||
|
|
||||||
|
exec "$@"
|
2
pom.xml
2
pom.xml
@ -155,7 +155,7 @@
|
|||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>initialize</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>copy-dependencies</goal>
|
<goal>copy-dependencies</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user