Using Rails Semantic Logger for logging, JSON logs can be tailed on AWS Elastic Beanstalk with lnav JSON log viewer from an eb ssh
command line session with this config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<channel version="4.1.0"> | |
<id>84a0bbfe-72dd-43ca-b9d7-d0bdfdfbf606</id> | |
<nextMetaDataId>5</nextMetaDataId> | |
<name>SQS Test</name> | |
<description></description> | |
<revision>3</revision> | |
<sourceConnector version="4.1.0"> | |
<metaDataId>0</metaDataId> | |
<name>sourceConnector</name> | |
<properties class="com.mirth.connect.connectors.file.FileReceiverProperties" version="4.1.0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER hasurauser WITH PASSWORD 'hasurapwd'; | |
-- for demo purposes, see below for production: | |
-- https://hasura.io/docs/latest/graphql/core/deployment/postgres-requirements.html | |
ALTER USER hasurauser WITH SUPERUSER; | |
CREATE DATABASE pipelinedemo WITH OWNER hasurauser; | |
\c pipelinedemo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp < Sinatra::Base | |
FILE_PATHS = [ | |
'document.pdf', | |
'movie.mov' | |
] | |
get "/zip" do | |
body = ZipStreamer.make_streaming_body(file_paths: file_paths) | |
headers = {'Transfer-Encoding' => 'chunked', 'Content-Disposition' => 'attachment; filename="myzip.zip"'} | |
[200,headers,body] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map "/tar" do | |
use RailsEnvConfigMiddleware | |
use Rack::Auth::Basic, "Private data" do |username, password| | |
User.auth(username,password) | |
end | |
run StreamTar | |
end | |
StreamTar = ->(env) { | |
hijack_proc = ->(socket) { | |
IO.popen("tar --to-stdout -c #{env['tar_path']}", external_encoding: Encoding::BINARY) do |tar_io| |