-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add echo audit middleware and devcontainer
Signed-off-by: Mike Mason <[email protected]>
- Loading branch information
Showing
16 changed files
with
969 additions
and
56 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# cockroachdb container config | ||
COCKROACH_INSECURE=true | ||
COCKROACH_HOST=crdb:26257 | ||
COCKROACH_URL="postgresql://root@crdb:26257/load_balancer_api_dev?sslmode=disable" | ||
|
||
# loadbalancerapi config | ||
LOADBALANCERAPI_CRDB_URI="postgresql://root@crdb:26257/load_balancer_api_dev?sslmode=disable" | ||
LOADBALANCERAPI_NATS_CREDS_FILE=".devcontainer/nsc/nkeys/creds/LOCAL/LBAAS/USER.creds" | ||
LOADBALANCERAPI_NATS_URL="nats://nats:4222" | ||
|
||
NATS_URL="nats://nats:4222" | ||
NATS_CREDS="/tmp/user.creds" | ||
|
||
NKEYS_PATH="/workspace/.devcontainer/nsc/nkeys" | ||
NSC_HOME="/workspace/.devcontainer/nsc/nats" | ||
|
||
# postgresql client config | ||
PGHOST=crdb | ||
PGPORT=26257 | ||
PGSSLMODE=disable | ||
PGDATABASE=load_balancer_api_dev | ||
PGUSER=root | ||
PAGER="less -iMx4 -FXe" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Go config | ||
GOBIN=/workspace/.go/bin | ||
GOENV=/workspace/.devcontainer/.env.go | ||
GOMODCACHE=/workspace/.go/pkg/mod | ||
GOPATH=/workspace/.go | ||
GOCACHE=/workspace/.go/cache/go-build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/go:0-1.20-bullseye | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarn-archive-keyring.gpg \ | ||
&& apt-get install apt-transport-https --yes \ | ||
&& apt-get update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
bash-completion \ | ||
uuid-runtime | ||
|
||
USER vscode | ||
|
||
RUN go install -v github.com/cweill/gotests/[email protected] | ||
|
||
# [Optional] Uncomment this line to install global node packages. | ||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 | ||
|
||
WORKDIR /workspace |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Config reference, https://containers.dev/implementors/json_reference/ | ||
{ | ||
"name": "auditevent", | ||
"dockerComposeFile":"docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspace", | ||
"shutdownAction": "stopCompose", | ||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"go.toolsManagement.checkForUpdates": "local", | ||
"go.useLanguageServer": true, | ||
"go.gopath": "/go" | ||
}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"2gua.rainbow-brackets", | ||
"golang.Go", | ||
"mutantdino.resourcemonitor", | ||
"oderwat.indent-rainbow", | ||
"ms-azuretools.vscode-docker", | ||
"RemiMarche.cspell-tech", | ||
"streetsidesoftware.code-spell-checker", | ||
"netcorext.uuid-generator" | ||
] | ||
} | ||
}, | ||
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
// "remoteEnv": {}, | ||
"features": { | ||
"git": "latest" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: "3.9" | ||
|
||
networks: | ||
infradev: | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
VARIANT: 1.20-bullseye | ||
NODE_VERSION: "none" | ||
command: | ||
- .devcontainer/scripts/app-entrypoint.sh | ||
env_file: | ||
- .env | ||
- .env.go | ||
volumes: | ||
- ..:/workspace | ||
networks: | ||
- infradev | ||
# Port forwarded for local development with emacs tramp | ||
# ports: | ||
# - "127.0.0.1:2222:2222" | ||
# Use "forwardPorts" in **devcontainer.json** to forward a port locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sleep infinity |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
coverage.out | ||
.tools/ | ||
.vscode/ | ||
.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
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
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
Oops, something went wrong.