Skip to content

Commit 262a199

Browse files
committed
done
1 parent 1cef5dd commit 262a199

File tree

11 files changed

+64
-186
lines changed

11 files changed

+64
-186
lines changed

content-checker/content-checker-service/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@
102102

103103
<profile>
104104
<id>local</id>
105-
<activation>
106-
<activeByDefault>true</activeByDefault>
107-
</activation>
108105
<dependencies>
109106
<dependency>
110107
<groupId>org.springdoc</groupId>
@@ -119,14 +116,6 @@
119116
</properties>
120117
</profile>
121118

122-
<profile>
123-
<id>prod</id>
124-
<properties>
125-
<spring.profiles.active>prod</spring.profiles.active>
126-
<build.profile>prod</build.profile>
127-
</properties>
128-
</profile>
129-
130119
</profiles>
131120

132121
</project>

docker/docker-compose-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ services:
5454
volumes:
5555
- ../main-app/main-webapp/src/main/resources/keycloak/:/opt/keycloak/data/import
5656
ports:
57-
- 8082:8080
57+
- 8080:8080
5858
- 9443:9443
5959
networks:
6060
- gtapp-network

docker/docker-compose.yml

Lines changed: 33 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
version: '3'
22
services:
3+
localhost: #expose all container ports so they can use services using localhost:PORT
4+
image: alpine:latest
5+
command: sleep infinity
6+
ports:
7+
- "8080:8080"
8+
- "8161:8161"
9+
- "3306:3306"
10+
- "1025:1025"
11+
- "8025:8025"
12+
- "9411:9411"
13+
- "8081:8081"
14+
- "8083:8083"
15+
- "8084:8084"
16+
- "8085:8085"
17+
- "8086:8086"
18+
- "8161:8161"
19+
- "61616:61616"
320
activemq:
421
# its not supported in M1 Mac, workaround is to enable Rosetta in Docker
522
# Docker settings → Features in development → check ☑ Use Rosetta for x86/amd64 emulation on Apple Silicon, and then restart Docker.
623
image: 'apache/activemq-artemis:2.37.0'
724
environment:
825
- "ARTEMIS_USER=admin"
926
- "ARTEMIS_PASSWORD=admin"
10-
ports:
11-
- "8161:8161" # use this to access from browser
12-
- "61616:61616"
13-
networks:
14-
- gtapp-network
27+
network_mode: "service:localhost"
1528
mysql:
1629
image: 'mysql'
1730
environment:
1831
- "MYSQL_USER=seedappuser"
1932
- "MYSQL_ROOT_PASSWORD=password"
2033
- "MYSQL_DATABASE=seedapp"
21-
ports:
22-
- "3306:3306"
2334
command: mysqld --lower_case_table_names=1 --character_set_server=utf8mb4 --explicit_defaults_for_timestamp
24-
networks:
25-
- gtapp-network
35+
network_mode: "service:localhost"
2636
emailhog:
2737
image: 'richarvey/mailhog'
28-
ports:
29-
- "1025:1025"
30-
- "8025:8025" # use this to access from browser
31-
networks:
32-
- gtapp-network
38+
network_mode: "service:localhost"
3339
zipkin:
3440
image: 'openzipkin/zipkin'
35-
ports:
36-
- "9411:9411"
37-
networks:
38-
- gtapp-network
41+
network_mode: "service:localhost"
3942
keycloak:
4043
image: 'quay.io/keycloak/keycloak:25.0.6'
4144
command: start-dev --import-realm
@@ -48,83 +51,50 @@ services:
4851
- "KEYCLOAK_HTTPS_PORT=9443"
4952
volumes:
5053
- ../main-app/main-webapp/src/main/resources/keycloak/:/opt/keycloak/data/import
51-
ports:
52-
- "8082:8080"
53-
- "9443:9443"
54-
networks:
55-
- gtapp-network
56-
54+
network_mode: "service:localhost"
5755
content-checker-service:
5856
image: gtapp-content-checker-service:latest
5957
environment:
6058
- "ZIPKIN_HOST=zipkin"
6159
- "ACTIVEMQ_ARTEMIS_HOST=activemq"
62-
ports:
63-
- "8083:8083"
64-
networks:
65-
- gtapp-network
60+
network_mode: "service:localhost"
6661
depends_on:
6762
- zipkin
6863
- activemq
6964
email-service:
7065
image: gtapp-email-service:latest
7166
environment:
72-
- "MAILHOG_HOST=emailhog"
73-
- "ZIPKIN_HOST=zipkin"
74-
ports:
75-
- "8085:8085"
76-
networks:
77-
- gtapp-network
67+
- "SPRING_PROFILES_ACTIVE=prod"
68+
network_mode: "service:localhost"
7869
depends_on:
7970
- emailhog
8071
- zipkin
8172
trend-service:
8273
image: gtapp-trend-service:latest
8374
environment:
84-
- "ZIPKIN_HOST=zipkin"
85-
- "ACTIVEMQ_ARTEMIS_HOST=activemq"
86-
ports:
87-
- "8084:8084"
88-
networks:
89-
- gtapp-network
75+
- "SPRING_PROFILES_ACTIVE=prod"
76+
network_mode: "service:localhost"
9077
depends_on:
9178
- zipkin
9279
report-service:
9380
image: gtapp-report-service:latest
9481
environment:
95-
- "ZIPKIN_HOST=zipkin"
96-
- "MYSQL_HOST=mysql"
97-
- "KEYCLOAK_HOST=keycloak"
98-
ports:
99-
- "8086:8086"
100-
networks:
101-
- gtapp-network
82+
- "SPRING_PROFILES_ACTIVE=prod"
83+
network_mode: "service:localhost"
10284
depends_on:
10385
- zipkin
10486
- mysql
10587
- keycloak
10688
main-webapp:
10789
image: gtapp-main-webapp:latest
10890
environment:
109-
- "MYSQL_HOST=mysql"
110-
- "ACTIVEMQ_ARTEMIS_HOST=activemq"
111-
- "KEYCLOAK_HOST=keycloak"
112-
- "KEYCLOAK_PORT=8082"
113-
- "EMAIL_SERVICE_HOST=email-service"
114-
- "REPORT_SERVICE_HOST=report-service"
115-
- "ZIPKIN_HOST=zipkin"
116-
ports:
117-
- "8081:8081"
118-
networks:
119-
- gtapp-network
91+
- "SPRING_PROFILES_ACTIVE=prod"
92+
network_mode: "service:localhost"
12093
depends_on:
12194
- zipkin
12295
- email-service
12396
- mysql
12497
- activemq
12598
- keycloak
126-
networks:
127-
gtapp-network:
128-
driver: bridge
129-
volumes:
130-
db-data:
99+
volumes:
100+
- /var/tmp/:/tmp/uploads/attachments/

email/email-service/pom.xml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,4 @@
144144
</plugins>
145145
</build>
146146

147-
<profiles>
148-
149-
<profile>
150-
<id>local</id>
151-
<activation>
152-
<activeByDefault>true</activeByDefault>
153-
</activation>
154-
<properties>
155-
<spring.profiles.active>local</spring.profiles.active>
156-
<build.profile>local</build.profile>
157-
</properties>
158-
</profile>
159-
<profile>
160-
<id>prod</id>
161-
<properties>
162-
<spring.profiles.active>prod</spring.profiles.active>
163-
<build.profile>prod</build.profile>
164-
</properties>
165-
</profile>
166-
167-
</profiles>
168-
169147
</project>

email/email-service/src/test/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spring:
1616
oauth2:
1717
resourceserver:
1818
jwt:
19-
issuer-uri: http://localhost:${KEYCLOAK_PORT:8082}/realms/articleapp
19+
issuer-uri: http://localhost:${KEYCLOAK_PORT:8080}/realms/articleapp
2020
logging.level:
2121
ROOT: WARN
2222
gt: INFO

main-app/main-webapp/pom.xml

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@
126126
<groupId>commons-io</groupId>
127127
<artifactId>commons-io</artifactId>
128128
</dependency>
129+
<dependency>
130+
<groupId>com.mysql</groupId>
131+
<artifactId>mysql-connector-j</artifactId>
132+
<scope>runtime</scope>
133+
</dependency>
129134

130135
<!-- security-->
131136
<dependency>
@@ -170,11 +175,6 @@
170175

171176
<!-- end processor/code generators -->
172177

173-
<dependency>
174-
<groupId>org.springdoc</groupId>
175-
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
176-
</dependency>
177-
178178
<dependency>
179179
<groupId>org.webjars</groupId>
180180
<artifactId>webjars-locator-core</artifactId>
@@ -515,67 +515,26 @@
515515
</build>
516516

517517
<profiles>
518-
<profile>
519-
<id>tls</id>
520-
<properties>
521-
<profile.tls>,tls</profile.tls>
522-
</properties>
523-
</profile>
518+
524519
<profile>
525520
<id>local</id>
526-
<activation>
527-
<activeByDefault>true</activeByDefault>
528-
</activation>
529521
<dependencies>
530522
<dependency>
531-
<groupId>org.springframework.boot</groupId>
532-
<artifactId>spring-boot-devtools</artifactId>
523+
<groupId>org.springdoc</groupId>
524+
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
525+
<version>${springdoc-openapi-ui.version}</version>
533526
<optional>true</optional>
534527
</dependency>
535528
<dependency>
536-
<groupId>com.mysql</groupId>
537-
<artifactId>mysql-connector-j</artifactId>
538-
<scope>runtime</scope>
529+
<groupId>org.springframework.boot</groupId>
530+
<artifactId>spring-boot-devtools</artifactId>
539531
</dependency>
540532
</dependencies>
541533
<properties>
542-
<spring.profiles.active>local${profile.tls}${profile.withTestContainer}</spring.profiles.active>
534+
<spring.profiles.active>local</spring.profiles.active>
543535
<build.profile>local</build.profile>
544536
</properties>
545537
</profile>
546-
<profile>
547-
<id>withTestContainer</id>
548-
<dependencies>
549-
<dependency>
550-
<groupId>org.testcontainers</groupId>
551-
<artifactId>testcontainers</artifactId>
552-
</dependency>
553-
<dependency>
554-
<groupId>com.github.dasniko</groupId>
555-
<artifactId>testcontainers-keycloak</artifactId>
556-
</dependency>
557-
<dependency>
558-
<groupId>org.testcontainers</groupId>
559-
<artifactId>mysql</artifactId>
560-
</dependency>
561-
</dependencies>
562-
<properties>
563-
<profile.withTestContainer>,withTestContainer</profile.withTestContainer>
564-
</properties>
565-
</profile>
566-
<profile>
567-
<id>prod</id>
568-
<dependencies>
569-
<dependency>
570-
<groupId>com.mysql</groupId>
571-
<artifactId>mysql-connector-j</artifactId>
572-
</dependency>
573-
</dependencies>
574-
<properties>
575-
<spring.profiles.active>prod</spring.profiles.active>
576-
<build.profile>prod</build.profile>
577-
</properties>
578-
</profile>
579-
580538
</profiles>
539+
581540
</project>

main-app/main-webapp/src/main/resources/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ spring:
4040
# we are using authorization code flow (login within keycloak app web ui)
4141
provider:
4242
oidc:
43-
# use http://localhost:8082/realms/articleapp/.well-known/openid-configuration to get config from keycloak
44-
issuer-uri: http://${KEYCLOAK_HOST:localhost}:${KEYCLOAK_PORT:8082}/realms/seedapp
43+
# use http://localhost:8080/realms/articleapp/.well-known/openid-configuration to get config from keycloak
44+
issuer-uri: http://${KEYCLOAK_HOST:localhost}:${KEYCLOAK_PORT:8080}/realms/seedapp
4545
registration:
4646
oidc:
4747
# authorization-grant-type: refresh_token

main-app/main-webapp/src/test/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spring:
2727
client:
2828
provider:
2929
oidc:
30-
issuer-uri: http://localhost:${KEYCLOAK_PORT:8082}/realms/seedapp
30+
issuer-uri: http://localhost:${KEYCLOAK_PORT:8080}/realms/seedapp
3131
registration:
3232
oidc:
3333
client-id: seed-app-gateway-client

main-app/report-service/pom.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,19 @@
112112

113113
<profile>
114114
<id>local</id>
115-
<activation>
116-
<activeByDefault>true</activeByDefault>
117-
</activation>
115+
<dependencies>
116+
<dependency>
117+
<groupId>org.springdoc</groupId>
118+
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
119+
<version>${springdoc-openapi-ui.version}</version>
120+
<optional>true</optional>
121+
</dependency>
122+
</dependencies>
118123
<properties>
119124
<spring.profiles.active>local</spring.profiles.active>
120125
<build.profile>local</build.profile>
121126
</properties>
122127
</profile>
123-
<profile>
124-
<id>prod</id>
125-
<properties>
126-
<spring.profiles.active>prod</spring.profiles.active>
127-
<build.profile>prod</build.profile>
128-
</properties>
129-
</profile>
130128

131129
</profiles>
132130

main-app/report-service/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spring:
1515
oauth2:
1616
resourceserver:
1717
jwt:
18-
issuer-uri: http://${KEYCLOAK_HOST:localhost}:${KEYCLOAK_PORT:8082}/realms/seedapp
18+
issuer-uri: http://${KEYCLOAK_HOST:localhost}:${KEYCLOAK_PORT:8080}/realms/seedapp
1919
server:
2020
port: 8086
2121

0 commit comments

Comments
 (0)