diff --git a/Dockerfile b/Dockerfile index 072bf12..f2f70c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,12 @@ ARG POSTGRES_URL ARG POSTGRES_PORT ARG REDIS_URL ARG REDIS_PORT +ARG MAILER_FROM +ARG MAILER_HOST +ARG MAILER_PORT +ARG MAILER_USERNAME +ARG MAILER_PASSWORD + RUN mvn -Pnative package FROM registry.access.redhat.com/ubi8/ubi-minimal @@ -34,6 +40,11 @@ ARG POSTGRES_DB ARG POSTGRES_URL ARG POSTGRES_PORT ARG REDIS_URL -ARG REDIS_PORT +ARG REDIS_PORT +ARG MAILER_FROM +ARG MAILER_HOST +ARG MAILER_PORT +ARG MAILER_USERNAME +ARG MAILER_PASSWORD EXPOSE 8080 CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] \ No newline at end of file diff --git a/build-image.sh b/build-image.sh index c05fc0d..f673dbc 100644 --- a/build-image.sh +++ b/build-image.sh @@ -1,3 +1,3 @@ #!/bin/bash source ../.env -docker build --build-arg POSTGRES_URL=${POSTGRES_URL} --build-arg POSTGRES_PORT=${POSTGRES_PORT} --build-arg POSTGRES_DB=${POSTGRES_DB} --build-arg POSTGRES_USER=${POSTGRES_USER} --build-arg POSTGRES_PASSWORD=${POSTGRES_PASSWORD} --build-arg REDIS_URL=${REDIS_URL} --build-arg REDIS_PORT=${REDIS_PORT} -t quarkus-native . +docker build --build-arg MAILER_FROM=${MAILER_FROM} --build-arg MAILER_HOST=${MAILER_HOST} --build-arg MAILER_PORT=${MAILER_PORT} --build-arg MAILER_USERNAME=${MAILER_USERNAME} --build-arg MAILER_PASSWORD=${MAILER_PASSWORD} --build-arg POSTGRES_URL=${POSTGRES_URL} --build-arg POSTGRES_PORT=${POSTGRES_PORT} --build-arg POSTGRES_DB=${POSTGRES_DB} --build-arg POSTGRES_USER=${POSTGRES_USER} --build-arg POSTGRES_PASSWORD=${POSTGRES_PASSWORD} --build-arg REDIS_URL=${REDIS_URL} --build-arg REDIS_PORT=${REDIS_PORT} -t quarkus-native . diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 6b68cd9..ca4bf9c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -15,15 +15,19 @@ quarkus.hibernate-orm.database.generation = update covas.schema.create = true quarkus.mailer.auth-methods=DIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN -quarkus.mailer.from=valczebackup@gmail.com -quarkus.mailer.host=smtp.gmail.com -quarkus.mailer.port=587 +quarkus.mailer.from=${MAILER_FROM:default@mail.com} +quarkus.mailer.host=${MAILER_HOST:smtp.default.com} +quarkus.mailer.port=${MAILER_PORT:587} quarkus.mailer.start-tls=REQUIRED -quarkus.mailer.username=valczebackup@gmail.com -quarkus.mailer.password=aohrpmqvxldwyebs +quarkus.mailer.username=${MAILER_USERNAME:default@mail.com} +quarkus.mailer.password=${MAILER_PASSWORD:default} quarkus.mailer.mock=false + + + + quarkus.redis.hosts=redis://${REDIS_URL:localhost}:${REDIS_PORT:6379} quarkus.http.cors=true