Skip to content

Commit

Permalink
Merge pull request #716 from hubmapconsortium/yuanzhou/log
Browse files Browse the repository at this point in the history
Yuanzhou/log
  • Loading branch information
yuanzhou authored Oct 22, 2023
2 parents 14d0838 + 330bc6c commit 640460b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ src/instance/search-config.yaml

**/__pycache__/

# Ignore docker env file
docker/.env

# Docker copied files and directories
docker/search-api/src
docker/search-api/VERSION
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "src/search-adaptor"]
path = src/search-adaptor
url = https://github.com/dbmi-pitt/search-adaptor.git
branch = dev-integrate
branch = main
ignore = dirty
7 changes: 7 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ services:
- "./search-api/nginx/conf.d:/etc/nginx/conf.d"
networks:
- gateway_hubmap
# Send docker logs to AWS CloudWatch
logging:
driver: awslogs
options:
awslogs-region: us-east-1
awslogs-group: search-api-docker-logs
awslogs-stream: ${LOG_STREAM}

networks:
# This is the network created by gateway to enable communicaton between multiple docker-compose projects
Expand Down
1 change: 1 addition & 0 deletions docker/example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOG_STREAM=DEV
2 changes: 1 addition & 1 deletion src/search-adaptor
Submodule search-adaptor updated 1 files
+1 −1 VERSION
5 changes: 3 additions & 2 deletions src/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ chdir = /usr/src/app/src
# Application's callbale
module = wsgi:application

# Location of uwsgi log file
logto = /usr/src/app/log/uwsgi-search-api.log
# Delegate the logging to the master process
# Send logs to stdout instead of file so docker picks it up and writes to AWS CloudWatch
log-master=true

# Master with 4 worker process (based on CPU number)
master = true
Expand Down

0 comments on commit 640460b

Please sign in to comment.