diff --git a/.gitignore b/.gitignore index ca10007a..5333a294 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.gitmodules b/.gitmodules index c5710c67..14cbd5d5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 58423bad..0d48f137 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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 diff --git a/docker/example.env b/docker/example.env new file mode 100644 index 00000000..b19e3e04 --- /dev/null +++ b/docker/example.env @@ -0,0 +1 @@ +LOG_STREAM=DEV diff --git a/src/search-adaptor b/src/search-adaptor index 8b9666e5..f056a9b7 160000 --- a/src/search-adaptor +++ b/src/search-adaptor @@ -1 +1 @@ -Subproject commit 8b9666e5f8ddf72b62f4fee97ba96f5fbb109b5c +Subproject commit f056a9b7447e2eecad4d67fd36426dbc75d881c2 diff --git a/src/uwsgi.ini b/src/uwsgi.ini index 3fb97044..bd367a58 100644 --- a/src/uwsgi.ini +++ b/src/uwsgi.ini @@ -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