Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hive/balance_tracker
1 result
Show changes
Commits on Source (3)
FROM openresty/openresty:alpine AS without_tag
COPY docker/balance_tracker_nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY docker/balance_tracker_nginx.conf.template /usr/local/openresty/nginx/conf/nginx.conf.template
COPY docker/rewriter_entrypoint.sh /entrypoint.sh
COPY rewrite_rules.conf /usr/local/openresty/nginx/conf/rewrite_rules.conf
CMD ["/entrypoint.sh"]
ARG BUILD_TIME
ARG GIT_COMMIT_SHA
ARG GIT_CURRENT_BRANCH
......
......@@ -254,7 +254,7 @@ process_blocks() {
echo 'Running indexer for existing blocks and expecting new blocks...'
fi
postgres_access=${postgres_url:-"postgresql://$postgres_user@$postgres_host:$postgres_port/haf_block_log"}
postgres_access=${postgres_url:-"postgresql://$postgres_user@$postgres_host:$postgres_port/haf_block_log?application_name=btracker_block_processing"}
if [ -z "$log_dir" ]; then
echo "Running indexer in the foreground"
......
......@@ -16,7 +16,10 @@ http {
location / {
include rewrite_rules.conf;
rewrite_log on;
# ${REWRITE_LOG} will be replaced by the docker entrypoint script.
# Set REWRITE_LOG=on in the environment to enable rewrite logging,
# otherwise it will remain disabled
${REWRITE_LOG}
proxy_pass http://balance-tracker-postgrest:3000; # my PostREST is here!
......@@ -29,4 +32,11 @@ http {
proxy_http_version 1.1;
}
}
server {
listen 0.0.0.0:81;
location /health {
return 204;
}
}
}
#!/bin/sh
# Default value for REWRITE_LOG is off, unless explicitly set to 'on'
if [ "$REWRITE_LOG" = "on" ]; then
REWRITE_LOG="rewrite_log on;"
else
REWRITE_LOG="# rewrite_log off;"
fi
# Use sed to replace the placeholder in the nginx template file
sed "s|\${REWRITE_LOG}|$REWRITE_LOG|g" /usr/local/openresty/nginx/conf/nginx.conf.template > /usr/local/openresty/nginx/conf/nginx.conf
# Start nginx
/usr/local/openresty/bin/openresty -g 'daemon off;'
......@@ -65,7 +65,7 @@ while [ $# -gt 0 ]; do
shift
done
POSTGRES_ACCESS=${POSTGRES_URL:-"postgresql://$POSTGRES_USER@$POSTGRES_HOST:$POSTGRES_PORT/haf_block_log"}
POSTGRES_ACCESS=${POSTGRES_URL:-"postgresql://$POSTGRES_USER@$POSTGRES_HOST:$POSTGRES_PORT/haf_block_log?application_name=btracker_install"}
echo "Installing app..."
psql "$POSTGRES_ACCESS" -v ON_ERROR_STOP=on -f "$SCRIPTPATH/../db/builtin_roles.sql"
......
......@@ -59,7 +59,7 @@ while [ $# -gt 0 ]; do
shift
done
POSTGRES_ACCESS_ADMIN=${POSTGRES_URL:-"postgresql://$POSTGRES_USER@$POSTGRES_HOST:$POSTGRES_PORT/haf_block_log"}
POSTGRES_ACCESS_ADMIN=${POSTGRES_URL:-"postgresql://$POSTGRES_USER@$POSTGRES_HOST:$POSTGRES_PORT/haf_block_log?application_name=btracker_uninstall"}
uninstall_app() {
......