From d6439b8845ca638dd86e4b8ff726ab765be04c12 Mon Sep 17 00:00:00 2001 From: Vusumuzi Khoza Date: Fri, 17 Oct 2025 16:37:24 +0200 Subject: [PATCH] updating ci --- .gitlab-ci.yml | 16 +- Dockerfile | 7 + src/main/resources/application.properties | 22 +- .../resources/liquibase-diff-changeLog.xml | 338 +++++++++++++++--- src/main/resources/liquibase.properties | 6 +- 5 files changed, 328 insertions(+), 61 deletions(-) create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a97602..c28fe2d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,14 +7,15 @@ variables: DOCKER_OPTS: "--insecure-registry=$REGISTRY" stages: - - package + - lab + - prod before_script: - docker info - docker login -u admin -p 1aae6202-7d42-44e4-bdc7-d988a95fdfe2 $REGISTRY -package: - stage: package +lab: + stage: lab script: - docker build -f Dockerfile-lab -t "$REGISTRY/$DEV_TAG" . - docker push "$REGISTRY/$DEV_TAG" @@ -22,3 +23,12 @@ package: - develop - feature/Develop-core-TM-functionality - hotfix/nflow + +prod: + stage: prod + script: + - docker build -f Dockerfile-lab -t "$REGISTRY/$TAG" . + - docker push "$REGISTRY/$TAG" + only: + - master + - release/0.0.1-RELEASE diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ab12d0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM 144.91.121.112:8082/java-17 +RUN mkdir /app +COPY . /app +WORKDIR /app +RUN mvn clean compile -P develop package +ENTRYPOINT ["/usr/bin/dumb-init", "--"] +CMD ["java", "-Dspring.profiles.active=nflow.db.postgresql", "-jar", "/app/target/tm-0.0.1-RELEASE.jar"] diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 535daeb..93d5e33 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ spring.application.name=tm -debug=true +debug=false logging.level.org.springframework.boot.autoconfigure=INFO @@ -10,9 +10,9 @@ server.servlet.context-path=/api spring.jpa.hibernate.ddl-auto=update spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://173.212.247.232:5532/qpay?useLegacyDatetimeCode=false +spring.datasource.url=jdbc:postgresql://62.171.179.108:5432/qpay?useLegacyDatetimeCode=false spring.datasource.username=postgres -spring.datasource.password=zdDZMzq6F4B4L1IUl +spring.datasource.password=zdDZMzq6F4B4L1IUla # sbz.merchant.url=http://192.168.16.29:24050/v1 @@ -20,7 +20,7 @@ spring.datasource.password=zdDZMzq6F4B4L1IUl sbz.merchant.url=https://api.stewardpay.co.zw/v1 sbz.aggregator.url=${sbz.merchant.url} sbz.aggregator.phone=263773591219 -sbz.aggregator.account=1041248676 +sbz.aggregator.account=1051184536 sbz.aggregator.client-id=qantratech_solutions sbz.aggregator.client-secret=70f5a9d7-b5cd-4fe8-855a-b2d035a8c24c @@ -29,13 +29,13 @@ sbz.aggregator.encryption-key=91b5b3c7-860f-473c-ac5c-b12d9121819b steward.payment.processor.url=${sbz.merchant.url} # ERPNext Configuration -erpnext.url=http://173.212.247.232:8085/api -erpnext.api.key=1102c6da0312f75 -erpnext.api.secret=e3d95692bcf16c7 +erpnext.url=http://62.171.179.108:8080/api +erpnext.api.key=dff94c65b52ecbd +erpnext.api.secret=49218fe805c9fb4 erpnext.username=Administrator erpnext.password=admin -erpnext.company=Qantra -erpnext.accounts.cash=Bank Account - Q +erpnext.company=QantraTech +erpnext.accounts.cash=Steward Bank Account - Q erpnext.accounts.gatewayexpense=Gateway Expenses - Q erpnext.accounts.accountsreceivable=Debtors - Q erpnext.accounts.commission=Discounts Received - Q @@ -51,9 +51,9 @@ jwt.expiration=86400000 logging.level.root=WARN nflow.db.postgresql.driver=org.postgresql.Driver -nflow.db.postgresql.url=jdbc:postgresql://173.212.247.232:5532/qpay +nflow.db.postgresql.url=jdbc:postgresql://62.171.179.108:5432/qpay nflow.db.postgresql.user=postgres -nflow.db.postgresql.password=zdDZMzq6F4B4L1IUl +nflow.db.postgresql.password=zdDZMzq6F4B4L1IUla # Email Configuration infobip.url=https://z3m696.api.infobip.com/sms/2/text/advanced diff --git a/src/main/resources/liquibase-diff-changeLog.xml b/src/main/resources/liquibase-diff-changeLog.xml index 642803d..f47fc2b 100644 --- a/src/main/resources/liquibase-diff-changeLog.xml +++ b/src/main/resources/liquibase-diff-changeLog.xml @@ -1,67 +1,317 @@ - - - - + + + + - + + + + + + - - + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + - - + + + + + + + + + + + - - + + + + + + + + + + + - - + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + - - + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + + + + + + + + + + + diff --git a/src/main/resources/liquibase.properties b/src/main/resources/liquibase.properties index ebf00e1..ef9d927 100644 --- a/src/main/resources/liquibase.properties +++ b/src/main/resources/liquibase.properties @@ -1,7 +1,7 @@ changeLogFile=src/main/resources/liquibase-diff-changeLog.xml -url=jdbc:postgresql://localhost:5432/qpay?serverTimezone=Africa/Harare&useLegacyDatetimeCode=false -username=root -password=password +url=jdbc:postgresql://62.171.179.108:5432/qpay?serverTimezone=Africa/Harare&useLegacyDatetimeCode=false +username=postgres +password=zdDZMzq6F4B4L1IUla driver=org.postgresql.Driver referenceUrl=hibernate:spring:zw.qantra.tm.domain.models?dialect=org.hibernate.dialect.PostgreSQLDialect&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy&hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy