Initial config for local deployments

Not yet working properly on cloud.gov
This commit is contained in:
Christa Hartsock
2022-06-23 15:53:23 -07:00
committed by GitHub
parent 2a918dbe98
commit 6d3f67fb9b
6 changed files with 64 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
set -e -o pipefail
TERMINATE_TIMEOUT=30
readonly LOGS_DIR="/home/vcap/logs"
function check_params {
if [ -z "${NOTIFY_APP_NAME}" ]; then
@@ -16,19 +17,23 @@ function check_params {
}
function configure_aws_logs {
# create files so that aws logs agent doesn't complain
touch ${LOGS_DIR}/gunicorn_error.log
touch ${LOGS_DIR}/app.log.json
aws configure set plugins.cwlogs cwlogs
cat > /home/vcap/app/awslogs.conf << EOF
[general]
state_file = /home/vcap/logs/awslogs-state
[/home/vcap/logs/app.log]
file = /home/vcap/logs/app.log*
[${LOGS_DIR}/app.log]
file = ${LOGS_DIR}/app.log.json
log_group_name = paas-${CW_APP_NAME}-application
log_stream_name = {hostname}
[/home/vcap/logs/gunicorn_error.log]
file = /home/vcap/logs/gunicorn_error.log
[${LOGS_DIR}/gunicorn_error.log]
file = ${LOGS_DIR}/gunicorn_error.log
log_group_name = paas-${CW_APP_NAME}-gunicorn
log_stream_name = {hostname}
EOF