Connecting the ecos-edi Microservice Locally
The yaml version for ECOS 4.2 and above is covered.
To run the ecos-edi microservice locally, perform the following steps:
Add the definition to the yaml file:
#=== ECOS EDI ===#
edi-app-dev:
container_name: edi-app-dev
image: enterprise-registry.citeck.ru/ecos-edi:1.0.0-snapshot
ports:
- 8083:8083
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms512m
- SPRING_PROFILES_ACTIVE=dev,swagger
- SPRING_RABBITMQ_HOST=rabbitmq-dev
- EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@ecos-registry:8761/eureka
- SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@ecos-registry:8761/config
- SPRING_DATASOURCE_URL=jdbc:postgresql://ecos-microservices-psql-dev:5432/ecos_edi
- SPRING_DATASOURCE_USERNAME=edi
- SPRING_DATASOURCE_PASSWORD=edipassword
- ECOS_INIT_DELAY=20
depends_on:
- ecos-registry
- rabbitmq-dev
Before starting, you also need to create the ecos_edi database in the ecos-microservices-psql-dev microservice database.
In the running ecos-microservices-psql-dev container, execute the following commands:
CREATE USER edi WITH ENCRYPTED PASSWORD 'edipassword';
CREATE DATABASE ecos_edi;
GRANT ALL PRIVILEGES ON DATABASE ecos_edi TO edi;
When running locally, also make sure that application.yml contains the EDI database connection parameters matching the created database.
Database creation has been added to the DB initialization script for nexus.citeck.ru/postgresql:12.7-1