Skip to content

Commit

Permalink
Reverts Port Configuration (eclipse-basyx#317)
Browse files Browse the repository at this point in the history
* Reverts application.properties

* Reverts pom

* Updates .env

* Reverts internal port configuration

Signed-off-by: FriedJannik <[email protected]>
Co-authored-by: Aaron Zielstorff <[email protected]>

---------

Signed-off-by: FriedJannik <[email protected]>
Co-authored-by: Aaron Zielstorff <[email protected]>
  • Loading branch information
FriedJannik and aaronzi authored Jun 18, 2024
1 parent 152e551 commit 7904300
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@
import org.eclipse.digitaltwin.basyx.common.mongocore.BasyxMongoMappingContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.repository.support.MappingMongoEntityInformation;
import org.springframework.data.mongodb.repository.support.SimpleMongoRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

/**
* MongoDB backend provider for the AAS Discovery
*
* @author zielstor, fried
*/

@ConditionalOnExpression("'${basyx.backend}'.equals('MongoDB')")
@Component
public class AasDiscoveryMongoDBBackendProvider implements AasDiscoveryBackendProvider {

private BasyxMongoMappingContext mappingContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=kafkaEvents,inMemoryStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=kafkaEvents,mongoDbStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=logEvents,inMemoryStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=logEvents,mongoDbStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
2 changes: 2 additions & 0 deletions basyx.aasrepository/basyx.aasrepository.component/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@

import org.eclipse.digitaltwin.basyx.aasxfileserver.backend.AASXFileServerBackendProvider;
import org.eclipse.digitaltwin.basyx.aasxfileserver.model.Package;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;


@ConditionalOnExpression("'${basyx.backend}'.equals('InMemory')")
@Component
public class AASXFileServerInMemoryBackendProvider implements AASXFileServerBackendProvider {

private AASXFileServerInMemoryCrudRepository repository = new AASXFileServerInMemoryCrudRepository();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=30s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=kafkaEvents,inMemoryStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=kafkaEvents,mongoDbStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=logEvents,inMemoryStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ RUN true
COPY --from=builder spring-boot-loader/ ./
COPY --from=builder application/ ./
ENV SPRING_PROFILES_ACTIVE=logEvents,mongoDbStorage
ARG PORT=8080
ENV SERVER_PORT=${PORT}
ARG CONTEXT_PATH=/
ENV SERVER_SERVLET_CONTEXT_PATH=${CONTEXT_PATH}
EXPOSE ${SERVER_PORT}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /application
ARG JAR_FILE=target/*-exec.jar
COPY ${JAR_FILE} basyxExecutable.jar
COPY src/main/resources/application.properties application.properties
ARG PORT=8081
ENV SERVER_PORT=${PORT}
EXPOSE ${SERVER_PORT}
HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1
ENTRYPOINT ["java","-jar","basyxExecutable.jar"]
4 changes: 2 additions & 2 deletions ci/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BASYX_VERSION=2.0.0-SNAPSHOT
BASYX_VERSION=2.0.0-milestone-02
AAS_WEBUI_VERSION=v2-240125
KEYCLOAK_VERSION=24.0.4
KEYCLOAK_VERSION=24.0.4
4 changes: 0 additions & 4 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ services:
- "8050:8080"
environment:
SERVER_SERVLET_CONTEXT_PATH: /
SERVER_PORT: 8080
restart: always
networks:
- basyx-java-server-sdk
Expand All @@ -91,7 +90,6 @@ services:
container_name: sm-registry-log-mem
environment:
SERVER_SERVLET_CONTEXT_PATH: /
SERVER_PORT: 8080
ports:
- "8060:8080"
restart: always
Expand All @@ -105,7 +103,6 @@ services:
- "8051:8080"
environment:
SERVER_SERVLET_CONTEXT_PATH: /
SERVER_PORT: 8080
BASYX_CORS_ALLOWED_ORIGINS: '*'
BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
BASYX_FEATURE_AUTHORIZATION_ENABLED: true
Expand All @@ -124,7 +121,6 @@ services:
container_name: secured-sm-registry-log-mem
environment:
SERVER_SERVLET_CONTEXT_PATH: /
SERVER_PORT: 8080
BASYX_CORS_ALLOWED_ORIGINS: '*'
BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
BASYX_FEATURE_AUTHORIZATION_ENABLED: true
Expand Down
8 changes: 0 additions & 8 deletions examples/BaSyxMinimal/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ services:

aas-env:
image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
environment:
- SERVER_PORT=8081
volumes:
- ./aas-env.properties:/application/application.properties
- ./aas:/application/aas
Expand All @@ -55,8 +53,6 @@ services:
image: eclipsebasyx/aas-registry-log-mongodb:2.0.0-SNAPSHOT
ports:
- 8082:8080
environment:
- SERVER_PORT=8080
volumes:
- ./aas-registry.yml:/workspace/config/application.yml
depends_on:
Expand All @@ -67,8 +63,6 @@ services:
image: eclipsebasyx/submodel-registry-log-mongodb:2.0.0-SNAPSHOT
ports:
- 8083:8080
environment:
- SERVER_PORT=8080
volumes:
- ./sm-registry.yml:/workspace/config/application.yml
depends_on:
Expand All @@ -79,8 +73,6 @@ services:
image: eclipsebasyx/aas-discovery:2.0.0-SNAPSHOT
ports:
- 8084:8081
environment:
- SERVER_PORT=8081
volumes:
- ./aas-discovery.properties:/application/application.properties
depends_on:
Expand Down
4 changes: 0 additions & 4 deletions examples/BaSyxNGINX/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ services:
aas-env:
image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
container_name: aas-env
environment:
SERVER_PORT: 8081
volumes:
- ./basyx/aas-env.properties:/application/application.properties
- ./aas:/application/aas
Expand Down Expand Up @@ -72,8 +70,6 @@ services:
container_name: aas-discovery
ports:
- 8084:8081
environment:
SERVER_PORT: 8081
volumes:
- ./basyx/aas-discovery.properties:/application/application.properties
restart: always
Expand Down
6 changes: 0 additions & 6 deletions examples/BaSyxOperationDelegation/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ services:
aas-env:
image: eclipsebasyx/aas-environment:2.0.0-milestone-02
container_name: aas-env
environment:
- SERVER_PORT=8081
volumes:
- ./aas:/application/aas
- ./basyx/aas-env.properties:/application/application.properties
Expand All @@ -21,8 +19,6 @@ services:
container_name: aas-registry
ports:
- '8082:8080'
environment:
- SERVER_PORT=8080
volumes:
- ./basyx/aas-registry.yml:/workspace/config/application.yml
restart: always
Expand All @@ -31,8 +27,6 @@ services:
container_name: sm-registry
ports:
- '8083:8080'
environment:
- SERVER_PORT=8080
volumes:
- ./basyx/sm-registry.yml:/workspace/config/application.yml
restart: always
Expand Down

0 comments on commit 7904300

Please sign in to comment.