variable mailer

This commit is contained in:
Valentin CZERYBA 2022-11-02 22:37:29 +01:00
parent cb33a6d61c
commit bbe5377d3d
3 changed files with 22 additions and 7 deletions

View File

@ -22,6 +22,12 @@ ARG POSTGRES_URL
ARG POSTGRES_PORT ARG POSTGRES_PORT
ARG REDIS_URL ARG REDIS_URL
ARG REDIS_PORT ARG REDIS_PORT
ARG MAILER_FROM
ARG MAILER_HOST
ARG MAILER_PORT
ARG MAILER_USERNAME
ARG MAILER_PASSWORD
RUN mvn -Pnative package RUN mvn -Pnative package
FROM registry.access.redhat.com/ubi8/ubi-minimal FROM registry.access.redhat.com/ubi8/ubi-minimal
@ -35,5 +41,10 @@ ARG POSTGRES_URL
ARG POSTGRES_PORT ARG POSTGRES_PORT
ARG REDIS_URL 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 EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
source ../.env 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 .

View File

@ -15,15 +15,19 @@ quarkus.hibernate-orm.database.generation = update
covas.schema.create = true covas.schema.create = true
quarkus.mailer.auth-methods=DIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN quarkus.mailer.auth-methods=DIGEST-MD5 CRAM-SHA256 CRAM-SHA1 CRAM-MD5 PLAIN LOGIN
quarkus.mailer.from=valczebackup@gmail.com quarkus.mailer.from=${MAILER_FROM:default@mail.com}
quarkus.mailer.host=smtp.gmail.com quarkus.mailer.host=${MAILER_HOST:smtp.default.com}
quarkus.mailer.port=587 quarkus.mailer.port=${MAILER_PORT:587}
quarkus.mailer.start-tls=REQUIRED quarkus.mailer.start-tls=REQUIRED
quarkus.mailer.username=valczebackup@gmail.com quarkus.mailer.username=${MAILER_USERNAME:default@mail.com}
quarkus.mailer.password=aohrpmqvxldwyebs quarkus.mailer.password=${MAILER_PASSWORD:default}
quarkus.mailer.mock=false quarkus.mailer.mock=false
quarkus.redis.hosts=redis://${REDIS_URL:localhost}:${REDIS_PORT:6379} quarkus.redis.hosts=redis://${REDIS_URL:localhost}:${REDIS_PORT:6379}
quarkus.http.cors=true quarkus.http.cors=true