This file contains hidden or 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 debian:10-slim | |
| RUN apt-get update -y && \ | |
| apt-get install -y awscli curl gnupg && \ | |
| apt-key adv --fetch-keys "https://nginx.org/keys/nginx_signing.key" && \ | |
| echo "deb http://nginx.org/packages/debian buster nginx" > /etc/apt/sources.list.d/nginx.list | |
| RUN curl --silent --show-error --location --output /tmp/amazon-ssm-agent.deb "https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb" && \ | |
| dpkg -i /tmp/amazon-ssm-agent.deb |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| GOOS=linux GOARCH=amd64 go build -o main main.go | |
| zip main.zip main |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name localhost; | |
| location /oauth2/ { | |
| proxy_pass http://oauth-proxy:4180; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Scheme $scheme; | |
| proxy_set_header X-Auth-Request-Redirect $request_uri; |
This file contains hidden or 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
| # Check server process is using jemalloc | |
| # ref. [Japanese] https://tech.studyplus.co.jp/entry/2019/09/09/094140 | |
| class AppController < ActionController::Base | |
| def show | |
| r = `strings /proc/#{Process.pid}/maps | grep jemalloc` | |
| render plain: "<h1>#{ENV['LD_PRELOAD'].presence || 'empty'}</h1><pre>#{r}</pre>" | |
| end | |
| end |
OlderNewer