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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
async function handleRequest(request) { | |
const url = new URL(request.url) | |
url.hostname = 'SOME_HOSTNAME' // i.e. 'dev-w-47n-vy-cd-e88kLg26GFbLGgBI.edge.tenants.auth0.com' | |
request = new Request(request) | |
request.headers.set('cname-api-key', 'SOME_KEY') // i.e. 'd4f2f3ef5a3ee3af4846127281d3450628bdc16d63e802dea75878fe9a63a279' | |
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
FROM ruby:2.6.2-alpine3.9 | |
ENV RAILS_VERSION 5.2.3 | |
ENV SHIPIT_VERSION 0.27.1 | |
# throw errors if Gemfile has been modified since Gemfile.lock | |
RUN bundle config --global frozen 1 | |
RUN apk add --no-cache --virtual .build-deps \ | |
build-base \ |
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
# The programming language website | |
https://www.lua.org/ | |
# Lua programming language information and resources | |
http://lua-users.org/wiki/ | |
# Just-In-Time Compiler for Lua | |
http://luajit.org/ | |
# Programming in Lua (first edition) |
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
# A must read for the basic docs for the lua-nginx-module OpenResty module | |
https://github.com/openresty/lua-nginx-module#readme | |
# Nginx Development Kit - an Nginx module that adds additional generic tools that module developers can use in their own modules | |
https://github.com/simplresty/ngx_devel_kit | |
# Getting started guide | |
http://www.staticshin.com/programming/definitely-an-open-resty-guide/ | |
# HTTP request processing phases in Nginx |
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
# JSON-to-Go converter | |
https://mholt.github.io/json-to-go/ |
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
# Run interactive TTY | |
$ docker run -it <image> /bin/sh | |
$ docker run -it <image> --entrypoint /bin/sh | |
# Publish a container’s port(s) to the host | |
$ docker run -p 127.0.0.1:80:80/tcp -it <image> | |
# Publish all exposed ports to random ports | |
$ docker run -P -it <image> |