-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vscode dev container configuration
This enables us to run vscode inside a container[1] Running it inside a container allows the db and softhsm tests to run Debugging tests (with breakpoints) in vscode should also be possible when running it inside a container! [1] https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 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,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" | ||
} |
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,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 |