Skip to content
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
10 changes: 0 additions & 10 deletions .devcontainer/Dockerfile

This file was deleted.

23 changes: 8 additions & 15 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@

Use [Devcontainers](https://code.visualstudio.com/docs/devcontainers/containers) to prepare a fully automated working environment.

Generate the `devcontainer.json` executing:

```shell
cd .devcontainer
./generate_devcontainer.sh
```

Now you should see the file `.devcontainer/devcontainer.json`. At this point you can use your favorite IDE to run Devcontainers

## VSCode

Install the extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

To open the repository with DevContainers do `Ctrl + Shift + P` and enter `Dev Containers: Rebuild and Reopen in Container`. For more options see the Extension documentations.

### Docker

Docker defaults should work fine therefore there is nothing to do.
Expand All @@ -35,8 +20,16 @@ Restart your OS if necessary and verify that podman listens:
systemctl --user status podman.socket
```

## VSCode

Install the extension https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

Only if you use podman, therefore Optional:

Go to the Extension Settings:

- `Dev › Containers: Docker Compose Path` set `podman-compose`
- `Dev › Containers: Docker Path` set `podman`
- `Dev › Containers: Docker Socket Path` set `/run/podman/podman.sock`

To open the repository with DevContainers do `Ctrl + Shift + P` and enter `Dev Containers: Rebuild and Reopen in Container` or `Dev Containers: Reopen in Container`. For more options see the Extension documentation.
4 changes: 0 additions & 4 deletions .devcontainer/generate_devcontainer.sh

This file was deleted.

1 change: 1 addition & 0 deletions .devcontainer/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu
45 changes: 45 additions & 0 deletions .devcontainer/node/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "trustify-ui",
"dockerComposeFile": "./docker-compose.yml",
"service": "trustify-ui",
"workspaceFolder": "/workspace",
"forwardPorts": [
3000
],
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
}
},
"customizations": {
"vscode": {
"extensions": [
"dsznajder.es7-react-js-snippets",
"biomejs.biome",
"ms-playwright.playwright",
"alexkrechik.cucumberautocomplete"
],
"settings": {
"git.alwaysSignOff": true,
"biome.searchInPath": false,
"biome.lsp.bin": "node_modules/@biomejs/cli-linux-x64/biome",
"editor.defaultFormatter": "biomejs.biome",
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cucumberautocomplete.steps": [
"e2e/tests/ui/features/@*/*.step.ts",
"e2e/tests/ui/steps/*.ts"
],
"cucumberautocomplete.strictGherkinCompletion": true
}
}
}
}
20 changes: 20 additions & 0 deletions .devcontainer/node/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
networks:
trustify:
name: "trustify"

services:
trustify-ui:
image: localhost/devcontainer-trustify-ui:latest
build:
dockerfile: ./Dockerfile
security_opt:
- "label=disable"
userns_mode: "keep-id"
environment:
TRUSTIFY_API_URL: http://trustify:8080
OIDC_SERVER_URL: http://localhost:9090/realms/trustify
command: /bin/sh -c "while sleep 1000; do :; done"
volumes:
- ../..:/workspace:cached
networks:
- trustify
1 change: 1 addition & 0 deletions .devcontainer/playwright/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/playwright:v1.55.0-jammy
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"name": "playwright",
"build": {
"dockerfile": "Dockerfile"
},
"workspaceFolder": "/workspaces/trustify-ui/e2e",
"runArgs": [
"--privileged",
"--userns=keep-id",
"--network=host",
"--add-host=${HOSTNAME}:127.0.0.1",
"-e DISPLAY=:2"
],
"name": "trustify-e2e",
"dockerComposeFile": "./docker-compose.yml",
"service": "playwright",
"workspaceFolder": "/workspace/e2e",
"remoteUser": "pwuser",
"forwardPorts": [
6080,
5901
],
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "pwuser"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
},
"ghcr.io/devcontainers/features/desktop-lite:1": {
"VNC_RESOLUTION": "1920x1200x16"
}
},
"forwardPorts": [6080, 5901],
"portsAttributes": {
"6080": {
"label": "browser vnc"
Expand All @@ -33,12 +34,13 @@
"alexkrechik.cucumberautocomplete"
],
"settings": {
"git.alwaysSignOff": true,
"cucumberautocomplete.steps": [
"tests/ui/features/@*/*.step.ts",
"tests/ui/steps/*.ts"
],
"cucumberautocomplete.strictGherkinCompletion": true
"cucumberautocomplete.strictGherkinCompletion": true
}
}
}
}
}
12 changes: 12 additions & 0 deletions .devcontainer/playwright/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
playwright:
image: localhost/devcontainer-trustify-e2e:latest
build:
dockerfile: ./Dockerfile
security_opt:
- "label=disable"
userns_mode: "keep-id"
network_mode: host
command: /bin/sh -c "while sleep 1000; do :; done"
volumes:
- ../..:/workspace:cached