Skip to content

Commit 596ae39

Browse files
committed
Test profile for h2, postgres for prod
1 parent 1d63899 commit 596ae39

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ RUN chmod 775 /work /work/application \
2727
EXPOSE 8080
2828
USER 1001
2929

30-
CMD ["./application", "-Dquarkus.http.host=0.0.0.0", "-Dquarkus.http.port=${PORT}", "-Dquarkus.datasource.url=${JDBC_DATABASE_URL}", "-Dquarkus.datasource.username=${JDBC_DATABASE_USERNAME}", "-Dquarkus.datasource.password=${JDBC_DATABASE_PASSWORD}", "-Dquarkus.datasource.driver=org.postgresql.Driver"]
30+
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@
6868
<groupId>io.quarkus</groupId>
6969
<artifactId>quarkus-jdbc-postgresql</artifactId>
7070
</dependency>
71-
<dependency>
72-
<groupId>io.quarkus</groupId>
73-
<artifactId>quarkus-jdbc-h2</artifactId>
74-
</dependency>
7571
</dependencies>
7672
<build>
7773
<plugins>

src/main/resources/application.properties

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
quarkus.http.port=${PORT:8080}
2+
13
# set DB - only mandatory part
2-
quarkus.datasource.url=jdbc:h2:tcp://localhost/mem:test
3-
quarkus.datasource.driver=org.h2.Driver
4+
quarkus.datasource.driver=org.postgresql.Driver
5+
quarkus.datasource.url=${JDBC_DATABASE_URL:jdbc:postgresql://localhost/db}
6+
quarkus.datasource.username=${JDBC_DATABASE_USERNAME:user}
7+
quarkus.datasource.password=${JDBC_DATABASE_PASSWORD:pass}
8+
%test.quarkus.datasource.url=jdbc:h2:tcp://localhost/mem:test
9+
%test.quarkus.datasource.driver=org.h2.Driver
410

511
# Hibernate details
612
quarkus.hibernate-orm.log.sql=true

0 commit comments

Comments
 (0)