Comments (14)
Hi
right now you can define variables and then use an env_file, in most cases that is good enough.
Do you need to set variable values on each docker-compose up
?
from docker-compose-ui.
Yh i want to have a compose template, and then allow my users via the ui to param this compose file and run a set of containers
from docker-compose-ui.
The env_file only set env variables into container.
I want to allow user to param some of others fields in the docker-compose.yml file, for ex :
web:
image: webimage/${version}
In command line, we can :
version=1.2.3 docker-compose up -d
cause compose substitute variable
I would like to do that via a UI
Thanx for reading
from docker-compose-ui.
you can use an env_file
for the docker-compose-ui service to perform variable substitution like this:
docker-compose.yml
docker_compose_ui:
image: francescou/docker-compose-ui:0.17
env_file: .env
.env
VERSION=8-jdk
java/docker-compose.yml
java:
image: "java:${VERSION}"
command: java -version
but, as you can see, this way you'll set an env shared between all the containers you manage from docker-compose-ui.
I'm not sure if this will be enough to you but I can't think of a "clean" way to implement variable substitution without using global variables. Feel free to suggest other solutions if you want, thanks.
from docker-compose-ui.
Thanx for the trick
But yh i think i want more than that :D
Ideally, i want a template project, with some variables, and allow my users to create a new project from that template, all that in a UI
If you know rancher, I want the same as the questions mechanism, but without the massive rancher infrastructure
from docker-compose-ui.
so if I've understood correctly, this feature should be integrated with "Create new project" and not the docker-compose up, right?
from docker-compose-ui.
Yeah right
from docker-compose-ui.
to achieve this I think it could be useful to have an advanced yaml editor (something like this: https://github.com/CenturyLinkLabs/lorry-ui ?) and a repository of docker-compose.yml template files.
I'll have to think about it since this feature does not play well with the new git based docker-compose.yml files management
what do you think about it?
from docker-compose-ui.
I think about that last couple of days, and this is how i see that :
A repository of templates, each project contain 2 files :
- The template (ex) :
version: "2"
services:
php:
image: "mysql:{{MYSQL_TAG}}"
environment:
MYSQL_ROOT_PASSWORD: {{MYSQL_PASS}}
- The param file (i choose json but can be other :D ):
{
"MYSQL_TAG": {
"type":"select",
"options": {
"url": "http://api.myorg.org/tags/mysql"
}
},
"MYSQL_PASS": {
"type":"password",
"placeholder":"Password of the root user"
}
}
A process take these two files and generate html form to fill the 2 fields
- The url http://api.myorg.org/tags/mysql return for example :
["latest","5.5",etc]
like https://index.docker.io/v1/repositories/mysql/tags for example
The submit button of the form replace the fileds in the template and display response
This is not limited to docker-compose files
Do you know something like that on github ?
from docker-compose-ui.
I guess you'll need something like http://www.alpacajs.org to generate the HTML form and maybe lodash template to process the docker-compose.yml file.
from docker-compose-ui.
Hi Guys,
I'm looking to a similar feature, and I was thinking on something simpler, what about simple Env var ?
I've got a compose file :
wordpress:
restart: always
image: wordpress
expose:
- "80"
environment:
- "WORDPRESS_DB_PASSWORD=${MYSQL_PWD}"
- "affinity:container!=*traefik*"
- reschedule:on-node-failure
depends_on:
- mysql
volumes:
- wordpress_www:/var/www/html
labels:
- "traefik.frontend.rule=Host:wordpress.${PROXY_DNS}"
- "traefik.docker.network=traefik_net"
logging:
driver: gelf
options:
gelf-address: udp://${LOGSTASH_IP}:12201
networks:
- traefik_net
- back
I used it to set mysql password, the Traefik rule for routing my request on my domain name, and ip for ELK logging.
In my case, just adding a text editor in the Settings section to set env variables like:
MYSQL_PWD=supersecret
PROXY_DNS=mydomain.com
LOGSTASH_IP=10.258.132.15
Then, just before calling docker-compose we just need to make an eval of this store file.
What do you think ?
from docker-compose-ui.
I try an implementation for this : https://github.com/allamand/docker-compose-ui Pull REquest #66 if you can try and let me know
from docker-compose-ui.
Hello @WTFKr0
docker compose env files are supported in francescou/docker-compose-ui:1.1.0
from docker-compose-ui.
@francescou has this issue been solved? From what I can tell, there's nowhere to enter environment variables (from a .env file) in the latest docker-compose-ui:1.4.1
Even a simple YML editor (alongside the existing "Create new project" form) would suffice for my use case. Personally, I'd like this to be implemented in the "up" action (as a modal of some sort), but I understand this introduces further complexities (where to list these containers, how to stop them, etc.).
from docker-compose-ui.
Related Issues (20)
- How to access private Git repo? HOT 2
- Multiple Docker Engines HOT 1
- Question - Is this project right for me? HOT 2
- Problem with same name of parent directory HOT 1
- Add support for .yaml HOT 3
- Doesn't work on Red Hat Enterprise Linux Server 7.4 HOT 2
- Services: no containers found HOT 3
- [Enhancement] Edit docker-compose file for existing services HOT 7
- State of project not recognised if a folder has a hypenated name
- Very useful tool HOT 1
- docker-compose 3.7 HOT 2
- Bring specific container down that was started with scale
- Display service version
- Nested docker-compose.yml
- permissions security vulnerability HOT 1
- Project website URL on GitHub project doesn't work HOT 4
- HTTPS support?
- Support for armv7l
- Is the docker-compose-ui project dead? HOT 2
- python 3.9 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-compose-ui.