ecos-uiserv-app
Purpose
Microservice image that provides UI elements and stores their settings (menus, journals, UI configs, forms, journal settings, dashboards)
Docker Compose service template
uiserv-app:
logging:
options:
max-size: "10m"
max-file: "5"
image: nexus.citeck.ru/ecos-uiserv:<UISERV_APP_IMAGE
container_name: uiserv-app
hostname: uiserv-app
restart: unless-stopped
stop_grace_period: 1m
depends_on:
- uiserv-postgresql
environment:
- JHIPSTER_REGISTRY_PASSWORD=alfr3sc0
- _JAVA_OPTIONS=-Xmx256m -Xms256m <UISERV_MENU_OVERRIDE
- SPRING_PROFILES_ACTIVE=prod,swagger
- 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=jdbc:postgresql://uiserv-postgresql:5432/uiserv
- JHIPSTER_SLEEP=120 # gives time for the JHipster Registry to boot before the application
expose:
- 8081/tcp
networks:
- app_network
volumes:
<MENU_OVERRIDE_DIR
- /opt/alfresco/logs/uiserv:/tmp
uiserv-postgresql:
image: postgres:10.4
container_name: uiserv-postgresql
hostname: uiserv-postgresql
restart: unless-stopped
stop_grace_period: 1m
environment:
- POSTGRES_USER=uiserv
- POSTGRES_PASSWORD=
volumes:
- /opt/micro/postgresql/uiserv:/var/lib/postgresql/data
networks:
- app_network
Used variables
_JAVA_OPTIONS - parameters for jvm
SPRING_PROFILES_ACTIVE - profiles used during deployment
EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE - URL of the default eureka load balancer, contains credentials
SPRING_CLOUD_CONFIG_URI - URL of the cloud config server used, contains credentials
JHIPSTER_REGISTRY_PASSWORD - user password for authentication in eureka load balancer
SPRING_DATASOURCE_URL - URL of the postgresql datasource used
JHIPSTER_SLEEP - timeout before microservice deployment
Typical log output for successful deployment
uiserv-app | ----------------------------------------------------------
uiserv-app | Application 'uiserv' is running! Access URLs:
uiserv-app | Local: http://localhost:8081/
uiserv-app | External: http://172.25.0.20:8081/
uiserv-app | Profile(s): [prod, swagger]
uiserv-app | ----------------------------------------------------------
uiserv-app | 2020-05-13 10:46:57.034 INFO 1 --- [ main] ru.citeck.ecos.uiserv.Application :
uiserv-app | ----------------------------------------------------------
uiserv-app | Config Server: Connected to the JHipster Registry running in Docker
uiserv-app | ----------------------------------------------------------