Public | Automated Build

Last pushed: 5 months ago
Short Description
Sys-Stack configuration service docker image
Full Description

sys-stack-serv-config

Sys-Stack configuration service



Documentation

Microservice environment specific variables:

  • bootstrap.yml :
    • SPRING_APPLICATION_NAME
  • application.yml :

Environment variable example:

SPRING_APPLICATION_NAME=config

Maven build example:

mvn \
-DSPRING_APPLICATION_NAME=config \
clean package install

Docker setup

Project docker image is based on maven:3.5.0-jdk-8-alpine

Docker run (no proxy) command example:

docker run \
--name=SysStackServConfig \
--net host \
-e SPRING_APPLICATION_NAME=config \
-it -p 9999:9999 \
gspanoae/sys-stack-serv-config:latest

Docker run (with proxy) command example:

docker run \
--name=SysStackServConfig \
--net host \
-e SPRING_APPLICATION_NAME=config \
-it -p 9999:9999 \
gspanoae/sys-stack-serv-config:latest \
--httpsProxySet=true --proxyHost=127.0.0.1 --proxyPort=3128

Docker run (with proxy and import java security cert from shared folder) command example:

1) start container with mounted location:

docker run \
--name=SysStackServConfig \
-v /hostfolder \
--net host \
-e SPRING_APPLICATION_NAME=config \
-it -p 9999:9999 \
gspanoae/sys-stack-serv-config:latest \
--httpsProxySet=true --proxyHost=127.0.0.1 --proxyPort=3128

2) from a second terminal check that the folder has been attached (under Mounts):

docker inspect SysStackServConfig

3) copy files to shared location

docker cp /my_data/. SysStackServConfig:/hostfolder

or

docker cp /my_data/filename.ext SysStackServConfig:/hostfolder

4) attach to the running container (docker exec -it SysStackServConfig /bin/bash) and import certs

keytool -import -alias SYSSTACKSERVCONFIG-CA -keystore /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/cacerts -file <filename.crt>
(password: changeit)

5) restart running container:

docker restart SysStackServConfig

NOTE: Don't forget to clean out unused volumes:

docker volume ls
docker volume prune

or run with --rm for dev/testing

Set jvm proxy configuration example:

-Dhttps.proxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3128
Docker Pull Command
Owner
gspanoae
Source Repository

Comments (0)