Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vscode dev container configuration #936

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// NOTE: YOU MUST RUN docker compose build app && docker compose build BEFORE ATTEMPTING TO RUN DEV CONTAINERS

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "app-hsm autograph"
,"dockerComposeFile": "docker-compose.yml"
,"service": "app-hsm"
,"containerUser": "app"
// ,"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind"
,"workspaceFolder": "/workspace"

// Features to add to the dev container. More info: https://containers.dev/features.
,"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "1.22",
"golangciLintVersion": "1.59.1"
},
"ghcr.io/devcontainers/features/git:1": {}
}
// Ensure the container is alive and running
,"overrideCommand": true

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
,"remoteUser": "root"
}
40 changes: 40 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
volumes:
apptmpdir:
hsmtmpdir:
services:
db:
extends:
service: db
file: ../docker-compose.yml
app:
extends:
service: app
file: ../docker-compose.yml
volumes:
- apptmpdir:/tmp/
- ../:/workspace
app-hsm:
extends:
service: app-hsm
file: ../docker-compose.yml
volumes:
- hsmtmpdir:/tmp/
- ../:/workspace
# We don't really need these for dev work
# but will keep these commented out just in case
# monitor:
# extends:
# service: monitor
# file: ../docker-compose.yml
# monitor-lambda-emulator:
# extends:
# service: monitor-lambda-emulator
# file: ../docker-compose.yml
# monitor-hsm-lambda-emulator:
# extends:
# service: monitor-hsm-lambda-emulator
# file: ../docker-compose.yml
# unit-test:
# extends:
# service: unit-test
# file: ../docker-compose.yml
Loading