mirror of
https://github.com/valitydev/dominant.git
synced 2024-11-06 02:25:17 +00:00
MSPF-97: introduce containerpilot (#7)
This commit is contained in:
parent
14b39673e3
commit
1709ca31ca
@ -3,7 +3,8 @@ cat <<EOF
|
||||
FROM $BASE_IMAGE
|
||||
MAINTAINER Igor Savchuk <i.savchuk@rbkmoney.com>
|
||||
COPY _build/prod/rel/dominant /opt/dominant
|
||||
CMD /opt/dominant/bin/dominant foreground
|
||||
COPY containerpilot.json /etc/containerpilot.json
|
||||
CMD /bin/containerpilot -config file:///etc/containerpilot.json /opt/dominant/bin/dominant foreground
|
||||
EXPOSE 8022
|
||||
# A bit of magic below to get a proper branch name
|
||||
# even when the HEAD is detached (Hey Jenkins!
|
||||
|
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@ -48,9 +48,15 @@ build('dominant', 'docker-host', finalHook) {
|
||||
sh "make build_image"
|
||||
}
|
||||
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
runStage('push image') {
|
||||
sh "make push_image"
|
||||
try {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
runStage('push image') {
|
||||
sh "make push_image"
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
runStage('rm local image') {
|
||||
sh 'make rm_local_image'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
Makefile
3
Makefile
@ -14,8 +14,7 @@ SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
|
||||
|
||||
# Base image for the service
|
||||
BASE_IMAGE_NAME := service_erlang
|
||||
BASE_IMAGE_TAG := 2202a02cbcb71982fea2e901ffb2b1ca5da610ae
|
||||
|
||||
BASE_IMAGE_TAG := 4000337c0ca19978467f62ca6505a03c2569de40
|
||||
|
||||
## Variables required for utils_container.mk
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit cb3389abfe0c0a969fa0415b15bf32b0a9005b4e
|
||||
Subproject commit 4858499fdd62af516a2239d51d12d82be0921857
|
13
containerpilot.json
Normal file
13
containerpilot.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"consul": "{{ .CONSUL_ADDR }}:8500",
|
||||
"services": [
|
||||
{
|
||||
"name": "dominant",
|
||||
"port": 8022,
|
||||
"health": "/usr/bin/curl --silent --show-error --output /dev/null localhost:8022",
|
||||
"poll": 1,
|
||||
"ttl": 2,
|
||||
"interfaces": ["eth0"]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user