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

Docker compose: using relative service address in environment
Azure Container Service: Update Docker-Compose?
Docker compose: doesnt allow to use constraints if you have a env variable set
How to use visual studio docker function on Windows Home edition?
Passing arguments to docker compose file when using it for swarm
How to run ad hoc docker compose commands in Ansible?
Using custom hostnames for docker local development containers
Changing the network name?
Let external container know about subnets created by multiple docker-compose projects
How to monitor / discover more docker containers with prometheus
two docker-compose .yml in the same network with COMPOSE_PROJECT_NAME
docker compose 3.1(swarm), secrets, ssl and nginx
What is the version directive for?
How to run docker-compose up -d at system start up?
In Docker Compose can I have services exiting
Docker compose - secrets Additional property secrets is not allowed

Categories

HOME
aix
blob
c++builder
crash
symfony-sonata
google-api-oauth
promotions
theory
osrm
comma
repeater
console-application
amazon-data-pipeline
cherrypy
javaagents
screen-scraping
email-client
angular2-changedetection
jms-topic
kundera
textview
wordpress-rest-api
urhosharp
n1ql
dropdownbox
ansible-inventory
lighting
mongoid5
nsdateformatter
nscollectionview
rbac
collation
qt-quick
python-venv
result
bootstrap-carousel
runner
jsfl
jcs
jscoverage
qudpsocket
queuing
avi
sbt-proguard
audiorecord
laterjs
camellia
markerspiderfier
windows-phone-8-emulator
identifying
vanilla-forums
dcg
sicstus-prolog
esri-arc-engine
teamstudio-unplugged
random-access
javadb
growl
cocos2d-x-2.x
redmine-plugins
windows-search
oxygenxml
ant-contrib
kernel-density
boofcv
codio
android-library
infinity.js
dd4t
magicsuggest
gpl
libx264
volatility
netbiscuits
eeprom
helicontech
scriptmanager
pex-and-moles
mismatch
method-call
functional-specifications
norton
xcdatamodel
p4.net
browser-state
dojox.gfx
file-storage
zend-acl
ffdshow

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