docker-compose


Docker compose: doesnt allow to use constraints if you have a env variable set


I have a docker compose that runs an Spring app, which receives some env variables and works fine.
The environment section is:
environment:
app.host: 10.5.124.30
cache.enabled: "true"
cmis.host: 10.5.100.48
cmis.username: testuser
It works flawlessly, but what happens is that it doesn't run in the containers that I would like it to run. So I found that I could set constraints.
That's what I did:
environment:
app.host: 10.5.124.30
cache.enabled: "true"
cmis.host: 10.5.100.48
cmis.username: testuser
- "constraint:application==sample"
So what I noticed, if I keep the properties as they are, it complains about the format, so I tried this
environment:
- "app.host=10.5.124.30"
- "acs.paas.host=10.5.100.48"
- "cache.enabled=true"
- "cmis.host=10.5.100.48"
- "cmis.username=testuser"
- "constraint:application==sample"
It ended going to the right node but all my env variables got lost.
I know that should be something simple, but I got lost here.

Related Links

Name an image built from running a docker-compose file
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user
Is it possible to create an intermediate image within docker-compose?
docker-compose service listen on specified interface
Does Docker-Compose allow overwriting of ports when using extends?

Categories

HOME
c#
azure-documentdb
itunesconnect
typo3
oracle-sqldeveloper
postgresql-9.3
opencv4android
spotfire
azure-resource-manager
mailchimp
cdn
qt4
rethinkdb
software-collections
adroitlogic
github-flavored-markdown
internet-explorer-7
simd
powerpivot
wallet
hapijs
orange
audio-streaming
handle
ecmascript-2017
knapsack-problem
continuous-fourier
large-files
sqldependency
emr
javapns
federated
jmsserializerbundle
ios-autolayout
ibm-bpm
loopback
epub
matlab-compiler
ansible-inventory
julia-jump
rbac
sknode
gradlew
html-entities
hierarchical-clustering
nao-robot
ionic2-select
ng-class
vertex
r-commander
selection-sort
blackberry
suitesparse
lightspeed
nls
esprima
git-push
hdr
qtruby
hfp
nimbus
system-integration
boost-bind
calc
ideavim
jersey-test-framework
computability
wiql
ruby-1.8.7
adempiere
autoscaling
android-filterable
clearquest
targetprocess
vectordrawable
tinymce-plugins
lwuit
xpand
twitter-finagle
episerver-7
winrun4j
new-operator
objectdatasource
kohana-orm
violation
listpicker
wpd
latex-suite
system.transactions
urlfetch
zepto
cron4j
netbiscuits
datejs
auto-compile
object-tag
response-time
viewdata
web-search
konsole
time-management
script-tag
expander
managed-code
scalable

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App