Skip to content

Commit

Permalink
Merge pull request #1001 from openkfw/979-update-docker
Browse files Browse the repository at this point in the history
scripts: update dev and operation setup
  • Loading branch information
daniel-arnauer authored Nov 3, 2021
2 parents 3fb4713 + 74c4364 commit 47a219a
Show file tree
Hide file tree
Showing 17 changed files with 453 additions and 398 deletions.
50 changes: 25 additions & 25 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"jsonwebtoken": "^8.5.0",
"lodash.isequal": "^4.5.0",
"raw-body": "^2.3.3",
"sodium-native": "^3.2.0",
"sodium-native": "^3.3.0",
"trubudget-logging-service": "^1.1.2",
"uuid": "^3.2.1",
"verror": "^1.10.0"
Expand Down
7 changes: 3 additions & 4 deletions bump-tag-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ if [ -z ${trubudget_version} ]; then
fi
trubudget_projects=('frontend' 'api' 'blockchain' 'e2e-test' 'provisioning' 'excel-export-service' 'email-notification-service' 'storage-service')

for project in "${trubudget_projects[@]}"
do
for project in "${trubudget_projects[@]}"; do
eval "cd $project"
echo "Bumping $project ..."
eval "sed -i '/\"version\": \"/c\"version\": \"$trubudget_version\",' ./package.json"
eval "perl -pi -e '/\"version\": \"/c\"version\": \"$trubudget_version\",' ./package.json"
eval "npm install --no-audit"
echo "Auditing only production dependencies ..."
eval "npm audit --production"
eval "cd .."
done
done
4 changes: 2 additions & 2 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In the following you can find all the environment variables used in the TruBudge
| Email notification service | email |
| Docker-compose | scripts |

If you need a `.env-example` file as a template, use the `.env-example` file in `/scripts/operation`. This file has all values pre-filled.
If you need a `.env_example` file as a template, use the `.env_example` file in `/scripts/operation`. This file has all values pre-filled.

| Env Variable | Required | Default Value | Used by | Description |
| -------------------------------- | -------- | --------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -59,7 +59,7 @@ If you need a `.env-example` file as a template, use the `.env-example` file in
| SMTP_PORT | no | 2500 | email | Port of external SMTP-Server |
| SMTP_SSL | no | false | email | If true the external SMTP-Server connection is using the SSL protocol |
| SQL_DEBUG | no | false | email | The SQL Debug option is forwarded to the knex configuration |
| EMAIL_FROM | no | Trubudget Notification Service👻 | email | This is injected into the `from` field of the email notification |
| EMAIL_FROM | no | Trubudget Notification Service | email | This is injected into the `from` field of the email notification |
| EMAIL_SUBJECT | no | Trubudget Notificaiton | email | This is injected into the `subject` field of the email notification |
| EMAIL_TEXT | no | You have received a notification. | email | This is injected into the `body` of the email notification |
| LOG_LEVEL | no | info | all | Defines the log output. Supported levels are `trace`, `debug`, `info`, `warn`, `error`, `fatal` |
Expand Down
2 changes: 1 addition & 1 deletion docs/operation-administration/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Trubudget provides a default example `.env_example` file which has to be renamed

You can find the documentation of all environmental variables in [environment-variables.md](../environment-variables.md).

If you need a `.env-example` file as a template, use the `.env-example` file in `/scripts/operation`. This file has all values pre-filled.
If you need a `.env_example` file as a template, use the `.env_example` file in `/scripts/operation`. This file has all values pre-filled.

#### Kubernetes

Expand Down
2 changes: 1 addition & 1 deletion email-notification-service/.env_example
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SMTP_PORT=2500
EMAIL_SERVICE=ENABLED
EMAIL_HOST=email-service
EMAIL_PORT=8890
EMAIL_FROM=Trubudget Notification Service👻
EMAIL_FROM=Trubudget Notification Service
EMAIL_SUBJECT=Trubudget Notificaiton
EMAIL_TEXT=You have received a notification.
RPC_PORT=8000
Expand Down
2 changes: 1 addition & 1 deletion email-notification-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To ensure all necessary environment variables are set correctly this section des
| SMTP_PORT | 2500 | Port of external SMTP-Server |
| SMTP_SSL | false | If true the external SMTP-Server connection is using the SSL protocol |
| SQL_DEBUG | false | The SQL Debug option is forwarded to the knex configuration |
| EMAIL_FROM | Trubudget Notification Service👻 | This is injected into the `from` field of the email notification |
| EMAIL_FROM | Trubudget Notification Service | This is injected into the `from` field of the email notification |
| EMAIL_SUBJECT | Trubudget Notificaiton | This is injected into the `subject` field of the email notification |
| EMAIL_TEXT | You have received a notification. | This is injected into the `body` of the email notification |
| LOG_LEVEL | info | Defines the log output. Supported levels are `trace`, `debug`, `info`, `warn`, `error`, `fatal` |
Expand Down
3 changes: 1 addition & 2 deletions email-notification-service/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ const config: Config = {
password: process.env.SMTP_PASSWORD || "test",
},
email: {
from:
process.env.EMAIL_FROM || '"Trubudget Notification Service👻" <trubudget@notification.com>',
from: process.env.EMAIL_FROM || '"Trubudget Notification Service" <trubudget@notification.com>',
subject: process.env.EMAIL_SUBJECT || "Trubudget Notificaiton",
text: process.env.EMAIL_TEXT || "You have received a notification.",
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# This file contains the minimum environmental vars that are needed for blockchain, emaildb,
# minio, master-api, email-service, provisioning, excel-export-service, storage and frontend
# This file contains the environmental vars for the setup

# Service enabling variables
# Service enabling variables - DO NOT CHANGE (handled by start-dev.sh)

MULTICHAIN_FEED=ENABLED
REACT_APP_EMAIL_SERVICE_ENABLED=true
EMAIL_SERVICE=ENABLED
REACT_APP_EXPORT_SERVICE_ENABLED=true
REACT_APP_EMAIL_SERVICE_ENABLED=true
DOCUMENT_FEATURE_ENABLED=true
REACT_APP_EXPORT_SERVICE_ENABLED=true
LOG_LEVEL=info

# Slave organization variables
# Settings variables - Change as you want to

## Slave organization variables
SLAVE_API_PORT=8081
SLAVE_ORGANIZATION=MySlaveOrganization
SLAVE_ORGANIZATION_VAULT_SECRET=newSecret
SLAVE_RPC_PORT=8001

# Settings variables

## Email relevant variables
EMAIL_PORT=8890
DB_TYPE=pg
Expand All @@ -40,9 +38,10 @@ USER_TABLE=users
SMTP_HOST=host.docker.internal
SMTP_PORT=2500
EMAIL_HOST=email-service
EMAIL_FROM=Trubudget Notification Service👻
EMAIL_SUBJECT=Trubudget Notificaiton
EMAIL_TEXT=You have received a notification.
EMAIL_PORT=8890
EMAIL_FROM="Trubudget Notification Service"
EMAIL_SUBJECT="Trubudget Notificaiton"
EMAIL_TEXT="You have received a notification."
AUTHENTICATION=none
ACCESS_CONTROL_ALLOW_ORIGIN=*
EMAIL_LOG_LEVEL=info
Expand All @@ -64,7 +63,6 @@ MINIO_PORT=9000
MINIO_HOST=localhost
MINIO_BUCKET_NAME=trubudget


## provisioning
API_PORT=8080
API_HOST=localhost
Expand All @@ -78,7 +76,7 @@ API_PORT=8080
API_HOST=localhost
BLOCKCHAIN_LOG_LEVEL=info

## API
## API
ORGANIZATION=KfW
ORGANIZATION_VAULT_SECRET=secret
RPC_HOST=127.0.0.1
Expand All @@ -98,13 +96,9 @@ NODE_ENV=development
REACT_APP_VERSION=$npm_package_version
EXPORT_HOST=excel-export-service
EXPORT_PORT=8888
EMAIL_HOST=email-service
EMAIL_PORT=8890
STORAGE_SERVICE_HOST=localhost
STORAGE_SERVICE_PORT=8090
INLINE_RUNTIME_CHUNK=false

##excel-export
## excel-export
ACCESS_CONTROL_ALLOW_ORIGIN=*
JWT_SECRET=uYbE6y1nrRkhN2EvderoxNpTS2JkaZbk
ENVIRONMENT_TYPE=TEST
Expand All @@ -114,4 +108,7 @@ EXCEL_LOG_LEVEL=info
PRETTY_PRINT=true

## Docker-Compose Variables
TAG=master
## TAG=latest: Only releases
## TAG=master: Current master (may have unfixed bugs)
## TAG=1.0.0: Specific release version
TAG=latest
Loading

0 comments on commit 47a219a

Please sign in to comment.