From f9e3e68f8deb426cfe6faf33782c3acb0b2dc030 Mon Sep 17 00:00:00 2001 From: Damian Borowiecki Date: Thu, 23 Jun 2022 09:03:57 +0200 Subject: [PATCH 1/3] OTC-612: Shared photos between REST API and Modular --- .env.example | 4 +++- conf/restapi/appsettings.Production.json | 2 +- conf/restapi/appsettings.json | 4 ++-- docker-compose.yml | 5 ++++- 4 files changed, 10 insertions(+), 5 deletions(-) mode change 100644 => 100755 conf/restapi/appsettings.Production.json mode change 100644 => 100755 conf/restapi/appsettings.json diff --git a/.env.example b/.env.example index bd5af95..65b0f6c 100644 --- a/.env.example +++ b/.env.example @@ -26,4 +26,6 @@ PROJECT_NAME=demo # docker compose project name IP_SUB=20 # to use in case there is multiple openimis, the container have fixed IP address to avoid issue when a container is recreated: then it could change ip and the gateway woin't find it anymore (limitation of free nginx) #OPENIMIS_BE_CONF_JSON= one-liner json config for the BE (to overright the openimis.json from the BE assembly) -#OPENIMIS_FE_CONF_JSON= one-liner json config for the FE (to overright the openimis.json from the FE assembly) \ No newline at end of file +#OPENIMIS_FE_CONF_JSON= one-liner json config for the FE (to overright the openimis.json from the FE assembly) + +ASPNETCORE_URLS=http://+:80 diff --git a/conf/restapi/appsettings.Production.json b/conf/restapi/appsettings.Production.json old mode 100644 new mode 100755 index b9885b8..7ca8f20 --- a/conf/restapi/appsettings.Production.json +++ b/conf/restapi/appsettings.Production.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "IMISDatabase": "server=db;Database=IMIS;User ID=IMISuser;Password=IMISuser@1234" + "IMISDatabase": "server=db;Database=IMIS;User ID=IMISuser;Password=IMISuser@1234" }, "Log4NetCore": { "PropertyOverrides": [ diff --git a/conf/restapi/appsettings.json b/conf/restapi/appsettings.json old mode 100644 new mode 100755 index 3812509..4654564 --- a/conf/restapi/appsettings.json +++ b/conf/restapi/appsettings.json @@ -33,8 +33,8 @@ "JsonDebugFolder": "\\log\\FromPhone\\Enrollment\\Debug\\", "SmsStrings": "\\log\\Escape\\Sms\\Strings\\", "SmsStringsSecondary": "\\log\\Escape\\Sms\\StringsSecondaryLanguage\\", - "SubmittedFolder": "\\Photos\\Submitted\\", - "UpdatedFolder": "\\Photos\\" + "SubmittedFolder": "/app/photos/Submitted/", + "UpdatedFolder": "/app/photos/" }, "SmsGateWay": null, "Defaults": { diff --git a/docker-compose.yml b/docker-compose.yml index 9fe073f..716a836 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: db: container_name: ${PROJECT_NAME:-openimis}-db build: - context: https://github.com/openimis/openimis-db_dkr.git#${RESTAPI_BRANCH:-develop} + context: https://github.com/openimis/openimis-db_dkr.git#${DB_BRANCH:-develop} args: - ACCEPT_EULA=${ACCEPT_EULA} - SA_PASSWORD=${DB_PASSWORD} @@ -49,6 +49,7 @@ services: - SITE_ROOT=api - SITE_URL=${NEW_OPENIMIS_HOST} - CELERY_BROKER_URL=amqp://rabbitmq + - PHOTO_ROOT_PATH=images/insurees depends_on: db: condition: service_healthy @@ -116,6 +117,8 @@ services: context: https://github.com/openimis/rest_api_c-sharp.git#${RESTAPI_BRANCH:-develop} args: BUILD-FLAVOUR: ${RESTAPI_BUILD_FLAVOUR:-Release} + environment: + - ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:80} volumes: - ./conf/restapi:/app/config - logs:/app/log From c91924c263cea03aa8ebafa48c1e03461cbfafd6 Mon Sep 17 00:00:00 2001 From: Damian Borowiecki Date: Fri, 24 Jun 2022 14:27:00 +0200 Subject: [PATCH 2/3] OTC-612: Change appsettings paths to unix notation --- conf/restapi/appsettings.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/conf/restapi/appsettings.json b/conf/restapi/appsettings.json index 4654564..0055d79 100755 --- a/conf/restapi/appsettings.json +++ b/conf/restapi/appsettings.json @@ -21,18 +21,18 @@ }, "AppPrefixDir": "/rest", "AppSettings": { - "FromPhone_Renewal": "\\log\\FromPhone\\Renewal\\", - "FromPhone_Renewal_Rejected": "\\log\\FromPhone\\Renewal\\Rejected\\", - "FromPhone_Claim": "\\log\\FromPhone\\Claim\\", - "FromPhone_Claim_Rejected": "\\log\\FromPhone\\Claim\\Rejected\\", - "FromPhone_Feedback": "\\log\\FromPhone\\Feedback\\", - "FromPhone_Feedback_Rejected": "\\log\\FromPhone\\Feedback\\Rejected\\", - "Extracts_Phone": "\\log\\Extracts\\Phone\\", - "Enrollment_Phone": "\\log\\FromPhone\\Enrollment\\", - "Extracts_Offline": "\\log\\Extracts\\Offline\\", - "JsonDebugFolder": "\\log\\FromPhone\\Enrollment\\Debug\\", - "SmsStrings": "\\log\\Escape\\Sms\\Strings\\", - "SmsStringsSecondary": "\\log\\Escape\\Sms\\StringsSecondaryLanguage\\", + "FromPhone_Renewal": "/log/FromPhone/Renewal/", + "FromPhone_Renewal_Rejected": "/log/FromPhone/Renewal/Rejected/", + "FromPhone_Claim": "/log/FromPhone/Claim/", + "FromPhone_Claim_Rejected": "/log/FromPhone/Claim/Rejected/", + "FromPhone_Feedback": "/log/FromPhone/Feedback/", + "FromPhone_Feedback_Rejected": "/log/FromPhone/Feedback/Rejected/", + "Extracts_Phone": "/log/Extracts/Phone/", + "Enrollment_Phone": "/log/FromPhone/Enrollment/", + "Extracts_Offline": "/log/Extracts/Offline/", + "JsonDebugFolder": "/log/FromPhone/Enrollment/Debug/", + "SmsStrings": "/log/Escape/Sms/Strings/", + "SmsStringsSecondary": "/log/Escape/Sms/StringsSecondaryLanguage/", "SubmittedFolder": "/app/photos/Submitted/", "UpdatedFolder": "/app/photos/" }, From ea262f2bb0b532253a4453ed92bb4b99d4ba5cc1 Mon Sep 17 00:00:00 2001 From: Patrick Delcroix Date: Fri, 9 Sep 2022 14:43:08 +0200 Subject: [PATCH 3/3] remove the commen after the config to avoid error --- .env.example | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.env.example b/.env.example index 65b0f6c..68ec3c8 100644 --- a/.env.example +++ b/.env.example @@ -7,25 +7,38 @@ DB_NAME=IMIS ACCEPT_EULA= # urls -NEW_OPENIMIS_HOST=demo.openimis.org # url of openimis -GATEWAY_PORT=80 # http port for openimis -GATEWAY_PORT_S=443 # https port for openimis +# url of openimis +NEW_OPENIMIS_HOST=demo.openimis.org +# http port for openimis +GATEWAY_PORT=80 +# https port for openimis +GATEWAY_PORT_S=443 # github branches to use -DB_BRANCH=main # branch to get the code of database -GW_BRANCH=main # branch to get the code of gateway -BE_BRANCH=main # branch to get the code of BE assembly -FE_BRANCH=main # branch to get the code of FE assembly -RESTAPI_BRANCH=main # branch to get the code of the restapi +# Database +DB_BRANCH=main +#Gate way +GW_BRANCH=main +# BE assembly +BE_BRANCH=main +#FE assembly +FE_BRANCH=main +# REST API +RESTAPI_BRANCH=main +# branch to get the code of the restapi # build flavours -RESTAPI_BUILD_FLAVOR=Release # rest API flavours +# rest API flavours +RESTAPI_BUILD_FLAVOR=Release # docker-compose parameters -PROJECT_NAME=demo # docker compose project name -IP_SUB=20 # to use in case there is multiple openimis, the container have fixed IP address to avoid issue when a container is recreated: then it could change ip and the gateway woin't find it anymore (limitation of free nginx) +# docker compose project name +PROJECT_NAME=demo +# to use in case there is multiple openimis, the container have fixed IP address to avoid issue when a container is recreated: then it could change ip and the gateway woin't find it anymore (limitation of free nginx) +IP_SUB=20 -#OPENIMIS_BE_CONF_JSON= one-liner json config for the BE (to overright the openimis.json from the BE assembly) -#OPENIMIS_FE_CONF_JSON= one-liner json config for the FE (to overright the openimis.json from the FE assembly) +#one-liner json config for the BE (to overright the openimis.json from the BE assembly) +#OPENIMIS_BE_CONF_JSON= -ASPNETCORE_URLS=http://+:80 +#one-liner json config for the FE (to overright the openimis.json from the FE assembly) +#OPENIMIS_FE_CONF_JSON= \ No newline at end of file