ecos-history-app
Purpose:
Microservice image for storing history, task statistics, and attribute facade.
Tags:
nexus.citeck.ru/ecos-history :<tag>
Docker Compose service template:
ecos-history:
logging:
options:
max-size: "10m"
max-file: "5"
image: nexus.citeck.ru/ecos-history:<ECOS_HISTORY_APP_IMAGE
container_name: ecos-history
hostname: ecos-history
restart: unless-stopped
stop_grace_period: 1m
environment:
- JHIPSTER_REGISTRY_PASSWORD=alfr3sc0
- _JAVA_OPTIONS=-Xmx256m -Xms256m
- SPRING_PROFILES_ACTIVE=<ECOS-HISTORY_PROFILES
- EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka
- SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config
- SPRING_DATASOURCE_URL=<ECOS_HISTORY_DATASOURCE
- SPRING_DATASOURCE_USERNAME=alfresco
- SPRING_DATASOURCE_PASSWORD=alfr3sc0
- SPRING_DATA_MONGODB_URI=<SPRING_DATA_MONGODB_URI
- SPRING_DATA_MONGODB_DATABASE=ecos-history
- ECOS-HISTORY_RECOVER_SOURCEFOLDER=/source
- ECOS-HISTORY_RECOVER_ERRORSFOLDER=/errors
- ECOS-HISTORY_ALFRESCO_TENANTID=<ALFRESCO_TENANT_ID
- ECOS-HISTORY_EVENT_HOST=<ECOS-HISTORY_EVENT_HOST
- ECOS-HISTORY_EVENT_PORT=<ECOS-HISTORY_EVENT_PORT
- ECOS-HISTORY_EVENT_USERNAME=<ECOS-HISTORY_EVENT_USERNAME
- ECOS-HISTORY_EVENT_PASSWORD=<ECOS-HISTORY_EVENT_PASSWORD
- JHIPSTER_SLEEP=1200 # gives time for the JHipster Registry to boot before the application
expose:
- 8086/tcp
volumes:
- /opt/micro/ecos-history/source:/source
- /opt/micro/ecos-history/errors:/errors
networks:
- app_network
depends_on:
- ecos
- ecos-postgresql
- rabbitmq
Used variables:
JHIPSTER_REGISTRY_PASSWORD - jhipster authentication password
_JAVA_OPTIONS - parameters for jvm
SPRING_PROFILES_ACTIVE - application deployment profiles
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE - URL for microservice registration in the load balancing service
SPRING_CLOUD_CONFIG_URI - URL of configuration parameters
SPRING_DATASOURCE_URL - postgresql URL of the instance with the history storage database
SPRING_DATASOURCE_USERNAME - user login for the history storage database
SPRING_DATASOURCE_PASSWORD - user password for the history storage database
SPRING_DATA_MONGODB_URI - mongodb URL of the instance for storing history/task records of node attributes
SPRING_DATA_MONGODB_DATABASE - database for storing history/task records of node attributes
ECOS-HISTORY_RECOVER_SOURCEFOLDER - backup datasource for the history event queue
ECOS-HISTORY_RECOVER_ERRORSFOLDER - backup datasource for storing history event queue processing errors
ECOS-HISTORY_ALFRESCO_TENANTID - tenantid of the deployed ecos instance
ECOS-HISTORY_EVENT_HOST - message queue dispatcher address
ECOS-HISTORY_EVENT_PORT - amqp port of the message queue dispatcher
ECOS-HISTORY_EVENT_USERNAME - user login for the message queue dispatcher
ECOS-HISTORY_EVENT_PASSWORD - user password for the message queue dispatcher
JHIPSTER_SLEEP - timeout before microservice deployment
Additional:
Documentation on spring cloud config
Typical log output for successful deployment:
ecos-history | ----------------------------------------------------------
ecos-history | Application 'history' is running! Access URLs:
ecos-history | Local: http://localhost:8086/
ecos-history | External: http://172.18.0.27:8086/
ecos-history | Profile(s): [prod, swagger, facade]
ecos-history | ----------------------------------------------------------
ecos-history | 2020-05-06 10:51:52.991 INFO 1 --- [ main] ru.citeck.ecos.history.HistoryApp :
ecos-history | ----------------------------------------------------------
ecos-history | Config Server: Connected to the JHipster Registry running in Docker
ecos-history | ----------------------------------------------------------