Skip to content

Commit

Permalink
ci-cd:add docker-compose & env for logging-service
Browse files Browse the repository at this point in the history
  • Loading branch information
mayrmartin authored and laurenzhonauer committed Oct 28, 2021
1 parent a5bfdd9 commit 1bae695
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
excel-export-service,
email-notification-service,
storage-service,
logging-service
]

defaults:
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
excel-export-service,
email-notification-service,
storage-service,
logging-service
]
include:
- project: frontend
Expand All @@ -134,6 +136,8 @@ jobs:
image_name: trubudget/email-notification
- project: storage-service
image_name: trubudget/storage-service
- project: logging-service
image_name: logging-service
defaults:
run:
working-directory: ${{ matrix.project }}
Expand Down
5 changes: 5 additions & 0 deletions logging-service/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LOGGER_PORT=3001
API_HOST=localhost
API_PORT=8080
LOG_LEVEL=trace
NODE_ENV=development
18 changes: 15 additions & 3 deletions scripts/development/.env_example_full
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ 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_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 Down Expand Up @@ -103,13 +103,25 @@ EMAIL_PORT=8890
STORAGE_SERVICE_HOST=localhost
STORAGE_SERVICE_PORT=8090
INLINE_RUNTIME_CHUNK=false
REACT_APP_LOGGING=true
REACT_APP_LOG_LEVEL=trace
REACT_APP_LOGGING_SERVICE_HOST=localhost
REACT_APP_LOGGING_SERVICE_PORT=3001
REACT_APP_LOGGING_SERVICE_HOST_SSL=false


##excel-export
ACCESS_CONTROL_ALLOW_ORIGIN=*
JWT_SECRET=uYbE6y1nrRkhN2EvderoxNpTS2JkaZbk
ENVIRONMENT_TYPE=TEST
EXCEL_LOG_LEVEL=info

##logging
LOGGER_PORT=300
API_HOST=localhost
API_PORT=8080
LOG_LEVEL=trace

## Used by most services to define log output
PRETTY_PRINT=true

Expand Down
21 changes: 16 additions & 5 deletions scripts/development/.env_example_slim
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ 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_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 Down Expand Up @@ -93,7 +93,7 @@ SIGNING_METHOD=node
API_LOG_LEVEL=info

## frontend
NODE_ENV=development
NODE_ENV=prod_
REACT_APP_VERSION=$npm_package_version
EXPORT_HOST=excel-export-service
EXPORT_PORT=8888
Expand All @@ -102,12 +102,23 @@ EMAIL_PORT=8890
STORAGE_SERVICE_HOST=localhost
STORAGE_SERVICE_PORT=8090
INLINE_RUNTIME_CHUNK=false
REACT_APP_LOGGING=false
REACT_APP_LOG_LEVEL=trace
REACT_APP_LOGGING_SERVICE_HOST=localhost
REACT_APP_LOGGING_SERVICE_PORT=3001
REACT_APP_LOGGING_SERVICE_HOST_SSL=false

##excel-export
ACCESS_CONTROL_ALLOW_ORIGIN=*
JWT_SECRET=uYbE6y1nrRkhN2EvderoxNpTS2JkaZbk
ENVIRONMENT_TYPE=TEST
EXCEL_LOG_LEVEL=info
EXCEL_LOG_LEVEL=trace

##logging
LOGGER_PORT=300
API_HOST=localhost
API_PORT=8080
LOG_LEVEL=trace

## Used by most services to define log output
PRETTY_PRINT=true
Expand Down
5 changes: 5 additions & 0 deletions scripts/development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ services:
EXPORT_PORT: ${EXPORT_PORT}
EXPORT_HOST: ${EXPORT_HOST}
INLINE_RUNTIME_CHUNK: ${INLINE_RUNTIME_CHUNK}
REACT_APP_LOGGING: ${REACT_APP_LOGGING}
REACT_APP_LOG_LEVEL: ${REACT_APP_LOG_LEVEL}
REACT_APP_LOGGING_SERVICE_HOST: ${REACT_APP_LOGGING_SERVICE_HOST}
REACT_APP_LOGGING_SERVICE_PORT: ${REACT_APP_LOGGING_SERVICE_PORT}
REACT_APP_LOGGING_SERVICE_HOST_SSL: ${REACT_APP_LOGGING_SERVICE_HOST_SSL}
# volume for hot reloading
volumes:
- "../../frontend/src:/app/src"
Expand Down
Empty file modified scripts/development/start-dev.sh
100644 → 100755
Empty file.
17 changes: 14 additions & 3 deletions scripts/operation/.env_example
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ SMTP_HOST=host.docker.internal
SMTP_PORT=2500
EMAIL_HOST=email-service
EMAIL_PORT=8890
EMAIL_FROM=Trubudget Notification Service👻
EMAIL_SUBJECT=Trubudget Notificaiton
EMAIL_TEXT=You have received a notification.
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 Down Expand Up @@ -98,13 +98,24 @@ REACT_APP_VERSION=$npm_package_version
EXPORT_HOST=excel-export-service
EXPORT_PORT=8888
INLINE_RUNTIME_CHUNK=false
REACT_APP_LOGGING=false
REACT_APP_LOG_LEVEL=trace
REACT_APP_LOGGING_SERVICE_HOST=localhost
REACT_APP_LOGGING_SERVICE_PORT=3001
REACT_APP_LOGGING_SERVICE_HOST_SSL=false

## excel-export
ACCESS_CONTROL_ALLOW_ORIGIN=*
JWT_SECRET=uYbE6y1nrRkhN2EvderoxNpTS2JkaZbk
ENVIRONMENT_TYPE=TEST
EXCEL_LOG_LEVEL=info

##logging
LOGGER_PORT=300
API_HOST=localhost
API_PORT=8080
LOG_LEVEL=trace

## Used by most services to define log output
PRETTY_PRINT=true

Expand Down
6 changes: 6 additions & 0 deletions scripts/operation/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ services:
EXPORT_PORT: ${EXPORT_PORT}
EXPORT_HOST: ${EXPORT_HOST}
INLINE_RUNTIME_CHUNK: ${INLINE_RUNTIME_CHUNK}
REACT_APP_LOGGING: ${REACT_APP_LOGGING}
REACT_APP_LOG_LEVEL: ${REACT_APP_LOG_LEVEL}
REACT_APP_LOGGING_SERVICE_HOST: ${REACT_APP_LOGGING_SERVICE_HOST}
REACT_APP_LOGGING_SERVICE_PORT: ${REACT_APP_LOGGING_SERVICE_PORT}
REACT_APP_LOGGING_SERVICE_HOST_SSL: ${REACT_APP_LOGGING_SERVICE_HOST_SSL}

networks:
mynetwork:
ipv4_address: 172.21.0.91
Expand Down

0 comments on commit 1bae695

Please sign in to comment.