-
Notifications
You must be signed in to change notification settings - Fork 227
Decompose the Compose files #69
Comments
Hi, only docker-compose.yml projects are supported, at the moment. I will investigate about the technical feasibility of this |
@allamand If you want to use something like |
+1 I have created a tool that "recompose" the docker command line via a config file (https://github.com/edyan/stakkr : it reads a list of services to start and get the right yml files). That's completely dynamic and I can't use your UI (unfortunately!). My config files are there : https://github.com/edyan/stakkr/tree/master/stakkr/static/services + I use a lot of env variables ... As docker compose has no api and it's a pure cli tool, maybe it's impossible to "guess" what has been loaded ? Thanks ! Edit : I found a way to write the full config dumped from networks:
stakkr:
driver: bridge
ipam:
config:
- subnet: 192.168.102.0/24
services:
apache:
container_name: mydev_apache
environment:
APACHE_GID: '1000'
APACHE_UID: '1000'
hostname: mydev_apache
image: edyan/apache:2.2
links:
- php
mem_limit: 512M
networks:
stakkr: null
volumes:
- /projects/mydev/home/www-data:/home/www-data:rw
- /projects/mydev/logs/apache:/var/log/apache2:rw
- /projects/mydev/www:/var/www:rw
compose-ui:
container_name: mydev_ui
hostname: mydev_ui
image: francescou/docker-compose-ui
networks:
stakkr: null
volumes:
- /tmp/stakkr/mydev:/compose-files/stakkr:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
working_dir: /compose-files
elasticsearch:
container_name: mydev_elasticsearch
hostname: mydev_elasticsearch
image: elasticsearch:1.6
mem_limit: 512M
networks:
stakkr: null
volumes:
- /projects/mydev/data/elasticsearch:/usr/share/elasticsearch/data:rw
maildev:
container_name: mydev_maildev
hostname: mydev_maildev
image: djfarrelly/maildev
networks:
stakkr: null
mysql:
container_name: mydev_mysql
environment:
MYSQL_ROOT_PASSWORD: changeme
hostname: mydev_mysql
image: mysql:5.5
mem_limit: 1024M
networks:
stakkr: null
volumes:
- /projects/mydev/conf/mysql-override:/etc/mysql/conf.d:rw
- /projects/mydev/data/mysql:/var/lib/mysql:rw
php:
cap_add:
- NET_ADMIN
- NET_RAW
container_name: mydev_php
environment:
ENVIRONMENT: dev
FPM_GID: '1000'
FPM_UID: '1000'
hostname: mydev_php
image: edyan/php:5.6-git
mem_limit: 512M
networks:
stakkr: null
volumes:
- /projects/mydev/conf/php-fpm-override:/etc/php/7.0/fpm/user-conf.d:rw
- /projects/mydev/conf/php-fpm-override:/etc/php/7.1/fpm/user-conf.d:rw
- /projects/mydev/conf/php-fpm-override:/etc/php/7.2/fpm/user-conf.d:rw
- /projects/mydev/conf/php-fpm-override:/etc/php5/fpm/user-conf.d:rw
- /projects/mydev/home/www-data:/home/www-data:rw
- /projects/mydev/logs/php:/var/log/php:rw
- /projects/mydev/www:/var/www:rw
phpmyadmin:
container_name: mydev_phpmyadmin
environment:
PHP_UPLOAD_MAX_FILESIZE: 128M
PMA_HOSTS: mysql
PMA_PASSWORD: changeme
PMA_USER: root
hostname: mydev_phpmyadmin
image: phpmyadmin/phpmyadmin
networks:
stakkr: null
version: '2.2' |
Hello @edyan I see you mount a volume |
Hi @francescou, yes that's the output ... to reproduce actually you'll have to install my tool (http://stakkr.readthedocs.io/en/latest/pages/installation.html#installation-under-linux) then dump the config ( |
do you save the output of |
yes I put it into /tmp/stakkr/mydev and I mount that that I set as a workdir. From your app I see the conf I have pasted above so it's taken into account |
ok so you can see your docker-compose project in the docker-compose-ui "Projects" left column, right? |
Absolutely but I have no container to start / stop, etc ... |
at the very beginning you don't have any service running, so you will not see any service until you click on "up" ( |
Ok ! So you read events from docker but don't read the initial state, right ? (as I set docker-compose-ui in my docker-compose.yml, it starts at the same time than other containers). |
Yes, it's correct: you can see the services only after the docker composition has been created. since you are running docker-compose-ui using that docker-compose.yml file you should be able to see all the services as long the docker compose project name is equal to the name of the folder containing the docker-compose.yml file. For example, if you start a composition |
Hi @francescou My feedback :
Conclusion:
Thanks for your support EDIT : for people who use multiple yml file, do a |
@edyan you're right. |
Hello,
Is it possible for compose-ui instead of reading docker-compose.yml file, to read docker-compose*.yml files ?
I used to specify several docker-compose-files with -f when using docker-compose, that allow me to simplify big docker-compose file maintenability ex :
The text was updated successfully, but these errors were encountered: