Skip to content
Snippets Groups Projects
Commit bd2ca65f authored by Martin Weise's avatar Martin Weise
Browse files

Refs #6

- Add colorful output depending on log severity :tada:
- Improved Dockerfile to use Docker caching better (=as long as pom.xml does not change, doesn't download deps again)
- Surpress bulky Spring INFO output
- Fix useless "No URLs will be polled" warning through suggested empty config.properties (https://github.com/Netflix/Hystrix/issues/275)
- Finally replaced Spring Web MVC with Webflux
- CORS Config replacing old Web MVC Config (fixes warning in f622eb3d)
parent f622eb3d
No related branches found
No related tags found
No related merge requests found
Showing
with 63 additions and 62 deletions
......@@ -7,11 +7,9 @@ services:
hostname: fda-discovery-server
build: ./fda-discovery-server
image: fda-discovery-server
environment:
SPRING_PROFILES_ACTIVE: docker
#environment:
# SPRING_PROFILES_ACTIVE: docker
network_mode: bridge
expose:
- 9090
ports:
- 9090:9090
......@@ -21,10 +19,8 @@ services:
build: ./fda-gateway-service
image: fda-gateway-service
network_mode: bridge
environment:
SPRING_PROFILES_ACTIVE: docker
expose:
- 9095
#environment:
# SPRING_PROFILES_ACTIVE: docker
ports:
- 9095:9095
links:
......@@ -49,10 +45,8 @@ services:
context: ./fda-database-managing-service
image: fda-database-managing-service
network_mode: bridge
environment:
SPRING_PROFILES_ACTIVE: docker
expose:
- 9092
#environment:
# SPRING_PROFILES_ACTIVE: docker
ports:
- 9092:9092
links:
......@@ -70,10 +64,8 @@ services:
build: ./fda-container-managing-service
image: fda-container-managing-service
network_mode: bridge
environment:
SPRING_PROFILES_ACTIVE: docker
expose:
- 9091
#environment:
# SPRING_PROFILES_ACTIVE: docker
ports:
- 9091:9091
volumes:
......@@ -91,10 +83,8 @@ services:
build: ./fda-query-service
image: fda-query-service
network_mode: bridge
environment:
SPRING_PROFILES_ACTIVE: docker
expose:
- 9093
#environment:
# SPRING_PROFILES_ACTIVE: docker
ports:
- 9093:9093
volumes:
......@@ -115,10 +105,8 @@ services:
image: fda-table-service
network_mode: bridge
environment:
SPRING_PROFILES_ACTIVE: docker
# SPRING_PROFILES_ACTIVE: docker
multipart.location: /tmp
expose:
- 9094
ports:
- 9094:9094
volumes:
......@@ -138,13 +126,11 @@ services:
network_mode: bridge
command: sh -c "/wait && flask run"
environment:
- EUREKA_SERVER=http://fda-discovery-server:9090/eureka
- WAIT_HOSTS=fda-discovery-server:9090
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
expose:
- 5000
EUREKA_SERVER: http://fda-discovery-server:9090/eureka
WAIT_HOSTS: fda-discovery-server:9090
WAIT_HOSTS_TIMEOUT: 300
WAIT_SLEEP_INTERVAL: 30
WAIT_HOST_CONNECT_TIMEOUT: 30
ports:
- 5000:5000
volumes:
......@@ -161,8 +147,6 @@ services:
hostname: fda-ui
build: ./fda-ui
image: fda-ui
expose:
- 3000
ports:
- 3000:3000
links:
......
......@@ -2,13 +2,14 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./api ./api
COPY ./rest-service ./rest-service
COPY ./services ./services
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./api ./api
COPY ./rest-service ./rest-service
COPY ./services ./services
RUN mvn -q clean package > /dev/null
###### SECOND STAGE ######
......
......@@ -3,6 +3,7 @@ spring.application.name=fda-container-managing
spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
eureka.instance.hostname=fda-container-managing
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
eureka.instance.preferIpAddress=true
\ No newline at end of file
# https://github.com/Netflix/Hystrix/issues/275
\ No newline at end of file
......@@ -2,13 +2,14 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./api ./api
COPY ./gateways ./gateways
COPY ./rest-service ./rest-service
COPY ./services ./services
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null
......
......@@ -3,6 +3,7 @@ spring.application.name=fda-database-managing
spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
eureka.instance.hostname=fda-database-managing
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
eureka.instance.preferIpAddress=true
\ No newline at end of file
# https://github.com/Netflix/Hystrix/issues/275
\ No newline at end of file
......@@ -2,11 +2,12 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./src ./src
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./src ./src
RUN mvn -q clean package > /dev/null
###### SECOND STAGE ######
......
......@@ -3,8 +3,9 @@ spring.application.name=fda-discovery-server
spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
eureka.instance.preferIpAddress=true
\ No newline at end of file
# https://github.com/Netflix/Hystrix/issues/275
\ No newline at end of file
......@@ -2,11 +2,12 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./src ./src
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./src ./src
RUN mvn -q clean package > /dev/null
###### SECOND STAGE ######
......
......@@ -26,7 +26,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
......
package at.tuwien.gatewayservice.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
public class WebConfig implements WebFluxConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedOrigins("*");
registry.addMapping("/**")
.allowedOrigins("*"); // FIXME
}
}
......@@ -4,5 +4,5 @@ spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.instance.hostname=fda-gateway-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
\ No newline at end of file
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
\ No newline at end of file
# https://github.com/Netflix/Hystrix/issues/275
\ No newline at end of file
......@@ -2,14 +2,15 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./api ./api
COPY ./gateways ./gateways
COPY ./persistence ./persistence
COPY ./rest-service ./rest-service
COPY ./services ./services
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null
......
......@@ -3,5 +3,6 @@ spring.application.name=fda-query-service
spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
eureka.instance.hostname=fda-query-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
# https://github.com/Netflix/Hystrix/issues/275
\ No newline at end of file
......@@ -2,13 +2,14 @@
FROM maven:slim as build
MAINTAINER Martin Weise <martin.weise@tuwien.ac.at>
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
COPY ./api ./api
COPY ./gateways ./gateways
COPY ./rest-service ./rest-service
COPY ./services ./services
COPY ./pom.xml ./
RUN mvn -fn -B dependency:go-offline > /dev/null
RUN mvn -q clean package > /dev/null
......
......@@ -3,8 +3,9 @@ spring.application.name=fda-table-service
spring.main.banner-mode=off
logging.level.root=warn
logging.level.at.=info
eureka.instance.hostname=fda-table-service
eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka/
logging.pattern.console="%d %highlight(%-5level): %msg%n"
eureka.instance.hostname=fda-discovery-server
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
spring.servlet.multipart.max-file-size=50MB
spring.servlet.multipart.max-request-size=50MB
multipart.location=${java.io.tmpdir}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment