Skip to content
Snippets Groups Projects
Commit 98c68604 authored by Gökhan Dasdemir's avatar Gökhan Dasdemir
Browse files

docker-compose.yml network change, listDatabases bugfixing

parent 99a4a6ea
No related branches found
No related tags found
1 merge request!2Analyse service merging to master
......@@ -5,6 +5,7 @@ services:
build:
context: ./fda-discovery-server
image: fda-discovery-server:latest
network_mode: bridge
expose:
- 9090
ports:
......@@ -15,6 +16,7 @@ services:
build:
context: ./fda-database-managing-service
image: fda-database-managing-service:latest
network_mode: bridge
environment:
- eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka
......@@ -24,6 +26,7 @@ services:
- 9092:9092
links:
- fda-discovery-server
- fda-container-managing-service
depends_on:
- fda-discovery-server
logging:
......@@ -34,6 +37,7 @@ services:
build:
context: ./fda-container-managing-service
image: fda-container-managing-service:latest
network_mode: bridge
environment:
- eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka
......@@ -54,6 +58,7 @@ services:
build:
context: ./fda-query-service
image: fda-query-service:latest
network_mode: bridge
environment:
- eureka.client.serviceUrl.defaultZone=http://fda-discovery-server:9090/eureka
expose:
......
......@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.SocketUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Service
......@@ -48,7 +49,7 @@ public class ContainerService {
}
public List<DatabaseContainer> findAllDatabaseContainers() {
List<Container> containers = dockerClient.listContainersCmd().withShowAll(true).exec();
List<Container> containers = dockerClient.listContainersCmd().withShowAll(true).withAncestorFilter(Arrays.asList("rdr-postgres:1.0")).exec();
List<DatabaseContainer> databaseContainers = new ArrayList<>();
containers.forEach(container -> {
DatabaseContainer databaseContainerByContainerByID = getDatabaseContainerByContainerID(container.getId());
......
package at.tuwien.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
}
......@@ -4,3 +4,4 @@ eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.instance.hostname=localhost
eureka.client.serviceUrl.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/
eureka.instance.preferIpAddress=true
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment