Skip to content

Commit 5267800

Browse files
Adds devcontainer
1 parent 07d6723 commit 5267800

7 files changed

Lines changed: 37 additions & 40 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/playwright:v1.50.0-noble
2+
RUN apt-get update && apt-get install -y wget apt-transport-https gnupg\
3+
&& wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -\
4+
&& echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list\
5+
&& apt-get update && apt-get install -y temurin-21-jdk

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Online Shop",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"features": {
7+
"ghcr.io/devcontainers/features/java:1": {
8+
"version": "none",
9+
"installMaven": "true",
10+
"mavenVersion": "3.8.6",
11+
"installGradle": "false"
12+
},
13+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
14+
"dockerDashComposeVersion": "v2"
15+
}
16+
},
17+
"postCreateCommand": "cd customer-client && npm ci && npx playwright install --with-deps chromium",
18+
"postStartCommand": "docker compose up --build && cd customer-client && npm run test:ui:codespaces",
19+
"customizations": {
20+
"vscode": {
21+
"settings": {},
22+
"extensions": [
23+
"streetsidesoftware.code-spell-checker",
24+
"ms-playwright.playwright"
25+
]
26+
}
27+
},
28+
"forwardPorts": [3000, 3030, 4040, 5050, 5432, 6060, 7070, 8181, 8832]
29+
}

.devcontainers/devcontainer.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!.gitignore
44
!.github
55
!.gitattributes
6+
!.devcontainer/
67
/keycloak/*
78
target/
89
workspace/

address-validation-service/src/main/java/de/openknowledge/sample/address/application/AddressResource.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
*/
1616
package de.openknowledge.sample.address.application;
1717

18-
import static jakarta.ws.rs.core.HttpHeaders.ACCEPT_LANGUAGE;
19-
import static java.util.Locale.GERMANY;
20-
import static java.util.Optional.ofNullable;
2118
import static java.util.stream.Collectors.joining;
2219

2320
import java.net.URI;

customer-client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"format:check": "prettier --check .",
1212
"preview": "vite preview",
1313
"test": "playwright test",
14-
"test:ui": "playwright test --ui"
14+
"test:ui": "playwright test --ui",
15+
"test:ui:codespaces": "playwright test --ui --ui-host=0.0.0.0 --ui-port=8832"
1516
},
1617
"dependencies": {
1718
"@tanstack/react-form": "^1.28.0",

docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ services:
9090
- POSTGRES_PASSWORD=delivery-password
9191
volumes:
9292
- ./delivery-service/src/main/resources/sql:/docker-entrypoint-initdb.d
93-
- "8184:8080"
9493
customer-client:
9594
build:
9695
context: customer-client/

0 commit comments

Comments
 (0)