Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c9c936f

Browse files
committed
Can someone review this commit, please ? (C) whatthecommit.com
1 parent ccd2391 commit c9c936f

File tree

18 files changed

+264
-93
lines changed

18 files changed

+264
-93
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
name: CI
2+
on: [push]
3+
env:
4+
CI: 'true'
5+
jobs:
6+
jboss-eap-postgres:
7+
strategy:
8+
matrix:
9+
java: [8]
10+
os: [ubuntu-latest]
11+
runs-on: ${{ matrix.os }}
12+
name: java-${{ matrix.java }} jboss-eap-postgres test
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/cache@v1
16+
with:
17+
path: ~/.n*
18+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-npm-
21+
- uses: actions/setup-node@v1
22+
- uses: actions/cache@v1
23+
with:
24+
path: ~/.docker
25+
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
26+
restore-keys: |
27+
${{ runner.os }}-docker-
28+
- run: sudo apt-get update -t docker-ce
29+
- uses: actions/cache@v1
30+
with:
31+
path: ~/.m2
32+
key: ${{ runner.os }}-maven-${{ hashFiles('**/mvnw') }}
33+
restore-keys: |
34+
${{ runner.os }}-maven-
35+
- uses: actions/setup-java@v1
36+
with:
37+
java-version: ${{ matrix.java }}
38+
- run: npm i -g wait-port
39+
- run: sudo apt-get install -y httpie
40+
- run: cd $GITHUB_WORKSPACE/jboss-eap-postgres && ./mvnw
41+
- run: cd $GITHUB_WORKSPACE/jboss-eap-postgres && ./mvnw -Pdocker docker-compose:up
42+
- run: wait-port 8080
43+
- run: sleep 30s
44+
- run: http get :8080/app/
45+
- run: http --ignore-stdin :8080/app/ data=ololo
46+
- run: http --ignore-stdin :8080/app/ data=trololo
47+
- run: http get :8080/app/
48+
- run: cd $GITHUB_WORKSPACE/jboss-eap-postgres && ./mvnw -Pdocker docker-compose:down
49+
kumuluzee-config:
50+
strategy:
51+
matrix:
52+
java: [8]
53+
os: [ubuntu-latest]
54+
runs-on: ${{ matrix.os }}
55+
name: java-${{ matrix.java }} kumuluzee-config test
56+
steps:
57+
- uses: actions/checkout@v1
58+
- uses: actions/cache@v1
59+
with:
60+
path: ~/.n*
61+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
62+
restore-keys: |
63+
${{ runner.os }}-npm-
64+
- uses: actions/setup-node@v1
65+
- uses: actions/cache@v1
66+
with:
67+
path: ~/.docker
68+
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
69+
restore-keys: |
70+
${{ runner.os }}-docker-
71+
- run: sudo apt-get update -t docker-ce
72+
- uses: actions/cache@v1
73+
with:
74+
path: ~/.m2
75+
key: ${{ runner.os }}-maven-${{ hashFiles('**/mvnw') }}
76+
restore-keys: |
77+
${{ runner.os }}-maven-
78+
- uses: actions/setup-java@v1
79+
with:
80+
java-version: ${{ matrix.java }}
81+
- run: npm i -g wait-port
82+
- run: sudo apt-get install -y httpie
83+
- run: cd $GITHUB_WORKSPACE/kumuluzee-config && ./mvnw
84+
- run: cd $GITHUB_WORKSPACE/kumuluzee-config && docker-compose up --force-recreate --remove-orphans --build -d
85+
- run: cd $GITHUB_WORKSPACE/kumuluzee-config && wait-port 8080
86+
- run: cd $GITHUB_WORKSPACE/kumuluzee-config && sleep 30s
87+
- run: |
88+
cd $GITHUB_WORKSPACE/kumuluzee-config
89+
docker-compose logs -f -t &
90+
http get :8080/config
91+
- run: cd $GITHUB_WORKSPACE/kumuluzee-config && docker-compose down -v --rmi local
92+
wildfly-swarm-maven:
93+
strategy:
94+
matrix:
95+
java: [8]
96+
os: [ubuntu-latest]
97+
runs-on: ${{ matrix.os }}
98+
name: java-${{ matrix.java }} wildfly-swarm-maven test
99+
steps:
100+
- uses: actions/checkout@v1
101+
- uses: actions/cache@v1
102+
with:
103+
path: ~/.n*
104+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
105+
restore-keys: |
106+
${{ runner.os }}-npm-
107+
- uses: actions/setup-node@v1
108+
- uses: actions/cache@v1
109+
with:
110+
path: ~/.m2
111+
key: ${{ runner.os }}-maven-${{ hashFiles('**/mvnw') }}
112+
restore-keys: |
113+
${{ runner.os }}-maven-
114+
- uses: actions/setup-java@v1
115+
with:
116+
java-version: ${{ matrix.java }}
117+
- run: npm i -g wait-port
118+
- run: sudo apt-get install -y httpie
119+
- run: cd $GITHUB_WORKSPACE/wildfly-swarm-maven && ./mvnw clean install
120+
#- run: cd $GITHUB_WORKSPACE/wildfly-swarm-maven && ./mvnw -Djava.net.preferIPv4Stack=true wildfly-swarm:run &
121+
- run: java -Djava.net.preferIPv4Stack=true -jar $GITHUB_WORKSPACE/wildfly-swarm-maven/target/*-swarm.jar &
122+
- run: wait-port 8080
123+
- run: sleep 30s
124+
- run: http get :8080
125+
wildfly-swarm-maven-with-gradle:
126+
strategy:
127+
matrix:
128+
java: [8]
129+
os: [ubuntu-latest]
130+
runs-on: ${{ matrix.os }}
131+
name: java-${{ matrix.java }} gradle wildfly-swarm-maven build
132+
steps:
133+
- uses: actions/checkout@v1
134+
- uses: actions/cache@v1
135+
with:
136+
path: ~/.gradle
137+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradlew') }}
138+
restore-keys: |
139+
${{ runner.os }}-gradle-
140+
- uses: actions/setup-java@v1
141+
with:
142+
java-version: ${{ matrix.java }}
143+
- run: cd $GITHUB_WORKSPACE/wildfly-swarm-maven && ./gradlew clean build wildfly-swarm-package
144+
# wildfly-swarm-maven-docker:
145+
# strategy:
146+
# matrix:
147+
# java: [8]
148+
# os: [ubuntu-latest]
149+
# runs-on: ${{ matrix.os }}
150+
# name: java-${{ matrix.java }} wildfly-swarm-maven docker test
151+
# steps:
152+
# - uses: actions/checkout@v1
153+
# - uses: actions/setup-node@v1
154+
# - uses: actions/cache@v1
155+
# with:
156+
# path: ~/.n*
157+
# key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
158+
# restore-keys: |
159+
# ${{ runner.os }}-npm-
160+
# - run: sudo apt-get update -t docker-ce
161+
# - uses: actions/cache@v1
162+
# with:
163+
# path: ~/.docker
164+
# key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}
165+
# restore-keys: |
166+
# ${{ runner.os }}-docker-
167+
# - uses: actions/setup-java@v1
168+
# with:
169+
# java-version: ${{ matrix.java }}
170+
# - uses: actions/cache@v1
171+
# with:
172+
# path: ~/.m2
173+
# key: ${{ runner.os }}-maven-${{ hashFiles('**/mvnw') }}
174+
# restore-keys: |
175+
# ${{ runner.os }}-maven-
176+
# - run: npm i -g wait-port
177+
# - run: sudo apt-get install -y httpie
178+
# - run: cd $GITHUB_WORKSPACE/wildfly-swarm-maven && ./mvnw clean install
179+
# - run: bash $GITHUB_WORKSPACE/wildfly-swarm-maven/docker/bin/test-docker-file.bash
180+
# - run: bash $GITHUB_WORKSPACE/wildfly-swarm-maven/docker/bin/test-docker-compose.bash
181+
# # sometimes docker swarm for some reasons not working here as 2nd, 3rd, ...
182+
# - run: bash $GITHUB_WORKSPACE/wildfly-swarm-maven/docker/bin/test-stack-deploy.bash

‎.travis.yml‎

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ jobs:
4848
- http :8080/app/dwr/index.html
4949
- ./gradlew composeDown
5050
#
51-
## ./jboss-eap-postgres/
52-
#- cd $TRAVIS_BUILD_DIR/jboss-eap-postgres/
53-
#- ./mvnw
54-
#- ./mvnw -Pdocker docker-compose:up
55-
#- ./mvnw -Pdocker docker-compose:down
56-
#- ./mvnw -Pdocker docker-compose:up &
57-
#- wait_for 8080
58-
#- sleep 15s
59-
#- http :8080/app/
60-
#- http :8080/app/ data=ololo
61-
#- http :8080/app/ data=trololo
62-
#- http :8080/app/
63-
#- ./mvnw -Pdocker docker-compose:down
6451
## jax-rs-hateoas-links
6552
#- cd $TRAVIS_BUILD_DIR/jax-rs-hateoas-links
6653
#- ./mvnw
@@ -459,16 +446,6 @@ jobs:
459446
- sleep 30
460447
- http :8080/client/v1/greet/Max
461448
- docker-compose down -v --rmi local
462-
- stage: test
463-
name: kumuluzee-config
464-
script:
465-
- cd $TRAVIS_BUILD_DIR/kumuluzee-config
466-
- bash mvnw clean package -U -T 4
467-
- docker-compose build --force-rm --no-cache --pull
468-
- docker-compose up --force-recreate --remove-orphans &
469-
- sleep 30
470-
- http :8080/client/v1/greet/Max
471-
- docker-compose down -v --rmi local
472449
## ext.js
473450
#- >
474451
# for path in \
@@ -571,22 +548,6 @@ jobs:
571548
- http :8080
572549
- http :8080/max
573550
- stop_any 8080 8080 8080
574-
- stage: test
575-
name: wildfly-swarm-maven
576-
script:
577-
- cd $TRAVIS_BUILD_DIR/wildfly-swarm-maven
578-
- bash mvnw clean install
579-
#- bash mvnw -Djava.net.preferIPv4Stack=true wildfly-swarm:run &
580-
- java -Djava.net.preferIPv4Stack=true -jar target/*-swarm.jar &
581-
- sleep 30
582-
- http :8080
583-
- sleep 1s
584-
- stop_any 8080
585-
- bash docker/bin/test-dockerfile.bash
586-
- bash docker/bin/test-docker-compose.bash
587-
# sometimes docker swarm for some reasons not working here as 2nd, 3rd, ...
588-
- bash docker/bin/test-stack-deploy.bash
589-
- bash gradlew clean build wildfly-swarm-package
590551
- stage: deploy
591552
name: Deploy docs
592553
script: skip

‎README.adoc‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
= java-ee-examples image:https://travis-ci.org/daggerok/java-ee-examples.svg?branch=master["Build Status", link="https://travis-ci.org/daggerok/java-ee-examples"]
1+
= java-ee-examples image:https://github.com/daggerok/java-ee-examples/workflows/CI/badge.svg["CI", link="https://github.com/daggerok/java-ee-examples/actions?query=workflow%3ACI"] image:https://travis-ci.org/daggerok/java-ee-examples.svg?branch=master["Build Status", link="https://travis-ci.org/daggerok/java-ee-examples"]
22

33
//tag::content[]
44

55
This repository contains simple JavaEE examples (including Docker, different Micro-Profiles, etc).
66

77
link:https://daggerok.github.io/java-ee-examples[Documentation]
88

9-
== projects and repositories:
9+
== projects and other repositories:
1010

11+
- https://github.com/daggerok/quarkus-websocket-sse
12+
- https://github.com/daggerok/integration-e2e-testing-with-selenide-and-testcontainers
13+
- https://github.com/daggerok/spring-boot-multi-java-ee-apps
1114
- link:https://github.com/daggerok/kotlin-payara-micro-profile[GitHub: daggerok/kotlin-payara-micro-profile]
1215
- link:https://github.com/daggerok/payara-micro-gradle-no-plugin[GitHub: daggerok/payara-micro-gradle-no-plugin]
1316
- link:https://github.com/daggerok/payara-micro-gradle-plugin-build-script[GitHub: daggerok/payara-micro-gradle-plugin-build-script]
@@ -81,6 +84,7 @@ link:https://daggerok.github.io/java-ee-examples[Documentation]
8184
- link:./kumuluzee-mp-2.0-jax-ws[Kumuluzee MP 2.0 JAX-WS]
8285
- link:https://github.com/daggerok/java-ee-entity-bean[Yet another JavaEE | JPA | CDI | JAX-RS | Docker example]
8386
- link:https://github.com/daggerok/java-ee-web-services[Yet another JavaEE | JAX-WS | Docker example]
87+
- https://github.com/daggerok/fork-practical-ddd-in-enterprise-java
8488

8589
== links
8690

‎jboss-eap-postgres/Dockerfile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM daggerok/jboss-eap-6.4:6.4.21-alpine
22
RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005\"" >> ${JBOSS_HOME}/bin/standalone.conf
33
EXPOSE 5005
4-
HEALTHCHECK --timeout=1s --retries=66 \
5-
CMD wget -q --spider http://127.0.0.1:8080/app/health \
6-
|| exit 1
4+
#HEALTHCHECK --timeout=6s --retries=66 --start-period=3s --interval=3s \
5+
# CMD wget -q --spider http://127.0.0.1:8080/app/health \
6+
# || exit 1
77
ADD --chown=jboss ./jboss-eap-6.4/modules/org/postgresql ${JBOSS_HOME}/modules/org/postgresql
88
ADD --chown=jboss ./jboss-eap-6.4/standalone/configuration/standalone.xml ${JBOSS_HOME}/standalone/configuration/standalone.xml
99
ADD --chown=jboss ./target/*.war ${JBOSS_HOME}/standalone/deployments/app.war

‎jboss-eap-postgres/docker-compose.yaml‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: '2.1'
22
services:
33
postgres:
4-
image: healthcheck/postgres:alpine
4+
image: postgres:alpine
55
restart: unless-stopped
6-
ports: ["5432:5432"]
6+
#ports: ['5432:5432']
77
environment:
88
POSTGRES_DB: db
99
POSTGRES_USER: user
@@ -15,16 +15,22 @@ services:
1515
- postgres
1616
- db.my-app.com
1717
- postgres.my-app.com
18+
healthcheck:
19+
test: pg_isready --host=127.0.0.1 --port=5432 --username=$$POSTGRES_USER --dbname=$$POSTGRES_DB
20+
timeout: 6s
21+
retries: 66
22+
interval: 3s
1823
jboss:
1924
depends_on:
2025
postgres:
2126
condition: service_healthy
2227
build: .
2328
restart: unless-stopped
24-
ports:
25-
- '5005:5005'
26-
- '8080:8080'
27-
- '9990:9990'
29+
ports: ['8080:8080']
30+
#ports:
31+
# - '5005:5005'
32+
# - '8080:8080'
33+
# - '9990:9990'
2834
environment:
2935
POSTGRES_DB: db
3036
POSTGRES_USER: user
@@ -37,6 +43,11 @@ services:
3743
- jboss
3844
- app.my-app.com
3945
- jboss.my-app.com
46+
healthcheck:
47+
test: wget -q --spider http://127.0.0.1:8080/app/health || exit 1
48+
timeout: 6s
49+
retries: 66
50+
interval: 6s
4051
networks:
4152
my-app.com:
4253
driver: bridge

‎jboss-eap-postgres/pom.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
</executions>
207207
<configuration>
208208
<composeFile>${project.basedir}/docker-compose.yaml</composeFile>
209+
<build>true</build>
209210
<detachedMode>true</detachedMode>
210211
<removeImages>true</removeImages>
211212
<removeImagesType>local</removeImagesType>

‎kumuluzee-config/pom.xml‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
34
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
55

6+
<version>0.0.1</version>
67
<groupId>daggerok</groupId>
78
<artifactId>prc</artifactId>
8-
<version>0.0.1</version>
9-
<packaging>pom</packaging>
10-
11-
<name>rpc</name>
129
<description>RPC</description>
10+
<name>${project.artifactId}</name>
11+
<modelVersion>4.0.0</modelVersion>
12+
<packaging>pom</packaging>
1313

1414
<properties>
15-
<maven.compiler.source>1.8</maven.compiler.source>
16-
<maven.compiler.target>1.8</maven.compiler.target>
15+
<java.version>1.8</java.version>
16+
<maven.compiler.source>${java.version}</maven.compiler.source>
17+
<maven.compiler.target>${java.version}</maven.compiler.target>
1718
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1819
</properties>
1920

@@ -25,4 +26,8 @@
2526
<module>rpc-app</module>
2627
</modules>
2728

29+
<build>
30+
<defaultGoal>clean package</defaultGoal>
31+
</build>
32+
2833
</project>

‎kumuluzee-config/rpc-app/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:8u131-jre-alpine
1+
FROM openjdk:8u212-jre-alpine3.9
22
MAINTAINER Maksim Kostromin https://github.com/daggerok
33
RUN apk --no-cache add busybox-suid bash curl \
44
&& addgroup app-group \

‎kumuluzee-config/rpc-app/src/main/java/daggerok/rpc/App.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
import lombok.extern.slf4j.Slf4j;
77

88
import javax.annotation.PostConstruct;
9+
import javax.enterprise.context.ApplicationScoped;
910
import javax.inject.Inject;
1011
import javax.ws.rs.ApplicationPath;
1112
import javax.ws.rs.core.Application;
1213

1314
@Slf4j
15+
@ApplicationScoped
1416
@ApplicationPath("")
1517
public class App extends Application {
1618

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /