Skip to content

Commit 42641d9

Browse files
split migration
1 parent e745bd2 commit 42641d9

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

Dockerfile.WithMigration.shizen

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM eclipse-temurin:17-jdk
2+
3+
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
4+
5+
ARG DB_HOST
6+
ARG DB_USERNAME
7+
ARG DB_PASSWORD
8+
ARG DB_DATABASE
9+
ARG DB_PORT
10+
11+
WORKDIR /code
12+
13+
ADD /src /code/src
14+
ADD /website /code/website
15+
ADD /pom.xml /code/pom.xml
16+
ADD /mvnw /code/mvnw
17+
ADD /.mvn /code/.mvn
18+
19+
RUN sed -i 's|${db.ip}|${env.DB_HOST}|g' pom.xml
20+
RUN sed -i 's|${db.port}|${env.DB_PORT}|g' pom.xml
21+
RUN sed -i 's|${db.user}|${env.DB_USERNAME}|g' pom.xml
22+
RUN sed -i 's|${db.password}|${env.DB_PASSWORD}|g' pom.xml
23+
RUN sed -i 's|${db.schema}|${env.DB_DATABASE}|g' pom.xml
24+
25+
CMD ./mvnw clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
26+
java -jar target/steve.jar
27+

Dockerfile.shizen

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN sed -i 's|${db.user}|${env.DB_USERNAME}|g' pom.xml
2222
RUN sed -i 's|${db.password}|${env.DB_PASSWORD}|g' pom.xml
2323
RUN sed -i 's|${db.schema}|${env.DB_DATABASE}|g' pom.xml
2424

25-
CMD ./mvnw clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
26-
java -jar target/steve.jar
25+
RUN ./mvnw clean package -Pkubernetes,no-flyway -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
26+
27+
CMD java -jar target/steve.jar
2728

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@
8989
<skipTests>false</skipTests>
9090
</properties>
9191
</profile>
92+
<profile>
93+
<id>no-flyway</id>
94+
<properties>
95+
<skipFlyway>true</skipFlyway>
96+
</properties>
97+
</profile>
98+
9299
</profiles>
93100

94101
<build>
@@ -331,6 +338,9 @@
331338
<goals>
332339
<goal>migrate</goal>
333340
</goals>
341+
<configuration>
342+
<skip>${skipFlyway}</skip>
343+
</configuration>
334344
</execution>
335345
</executions>
336346

0 commit comments

Comments
 (0)