mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Initial config for local deployments
Not yet working properly on cloud.gov
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user