-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(devfile2): introduce devfile V2 to be working in devworkspaces Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
- Loading branch information
1 parent
22b2d31
commit b156150
Showing
4 changed files
with
134 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
.idea/compiler.xml | ||
.idea/encodings.xml | ||
.idea/vcs.xml | ||
.vscode | ||
**/*.iml | ||
target | ||
*.iml | ||
|
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 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Debug (Attach) - Backend", | ||
"request": "attach", | ||
"hostName": "localhost", | ||
"port": 5006 | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Debug (Attach) - Frontend", | ||
"request": "attach", | ||
"hostName": "localhost", | ||
"port": 5005 | ||
} | ||
] | ||
} |
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,7 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"redhat.java" | ||
] | ||
} |
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,108 @@ | ||
schemaVersion: 2.1.0 | ||
metadata: | ||
name: java-guestbook | ||
components: | ||
- name: tools | ||
container: | ||
image: quay.io/devfile/universal-developer-image:ubi8-d433ed6 | ||
memoryLimit: 3Gi | ||
|
||
endpoints: | ||
- name: java-guestbook-backend | ||
exposure: public | ||
protocol: http | ||
targetPort: 8080 | ||
|
||
- name: java-guestbook | ||
exposure: public | ||
protocol: tcp | ||
targetPort: 8443 | ||
|
||
- name: debug | ||
exposure: none | ||
protocol: tcp | ||
targetPort: 5005 | ||
|
||
volumeMounts: | ||
- name: m2 | ||
path: /home/user/.m2 | ||
|
||
- name: mongo | ||
container: | ||
image: quay.io/eclipse/che--centos--mongodb-36-centos7:latest-ffdf2431bbc6d9a9d2a03e95bbbe8adb49ab9eac301f268a35038c84288259c1 | ||
memoryLimit: 300Mi | ||
env: | ||
- name: MONGODB_USER | ||
value: user | ||
|
||
- name: MONGODB_PASSWORD | ||
value: password | ||
|
||
- name: MONGODB_DATABASE | ||
value: guestbook | ||
|
||
- name: MONGODB_ADMIN_PASSWORD | ||
value: password | ||
|
||
endpoints: | ||
- name: java-guestbook-mongodb | ||
exposure: none | ||
protocol: tcp | ||
targetPort: 27017 | ||
|
||
volumeMounts: | ||
- name: mongodbdata | ||
path: /var/lib/mongodb/data | ||
|
||
- name: m2 | ||
volume: | ||
size: 1G | ||
|
||
- name: mongodbdata | ||
volume: | ||
size: 1G | ||
|
||
commands: | ||
- id: maven-build-backend | ||
exec: | ||
label: "build backend" | ||
component: tools | ||
workingDir: "${PROJECTS_ROOT}/java-guestbook/backend" | ||
commandLine: "mvn clean install" | ||
group: | ||
kind: build | ||
isDefault: true | ||
|
||
- id: maven-build-frontend | ||
exec: | ||
label: "build frontend" | ||
component: tools | ||
workingDir: "${PROJECTS_ROOT}/java-guestbook/frontend" | ||
commandLine: "mvn clean install" | ||
group: | ||
kind: build | ||
isDefault: true | ||
|
||
- id: run-backend | ||
exec: | ||
label: "run backend" | ||
component: tools | ||
workingDir: "${PROJECTS_ROOT}/java-guestbook/backend" | ||
commandLine: | | ||
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006,quiet=y \ | ||
-jar target/backend-1.0.jar | ||
group: | ||
kind: run | ||
isDefault: true | ||
|
||
- id: run-frontend | ||
exec: | ||
label: "run frontend" | ||
component: tools | ||
workingDir: "${PROJECTS_ROOT}/java-guestbook/frontend" | ||
commandLine: | | ||
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y \ | ||
-jar target/frontend-1.0.jar | ||
group: | ||
kind: run | ||
isDefault: true |