Commit graph

30 commits

Author SHA1 Message Date
Pieter van de Bruggen
a4bd90ff8a Correlate Services and Containers by Service Name
The config hash ends up not being a unique identifier of a Service.  Additionally, Services may have multiple associated Containers.

``` yaml
# Sample docker-compose.yml
version: "2.2"

services:
  named-service:
    container_name: 'named-container'
    image: 'alpine'
    command: 'sh -c "while :; do sleep 1; done"'

  anonymous-service:
    image: 'alpine'
    command: 'sh -c "while :; do sleep 1; done"'

  scaled-service:
    image: 'alpine'
    scale: 3
    command: 'sh -c "while :; do sleep 1; done"'
```

``` bash
$ docker-compose config --hash="*"
named-service e6e7c4564dfc435ba96725098c62e6b6cf8da9f0b76b0a08be2baddedad6d007
anonymous-service 254f4815ef36bc9fcc2ce80f82278187c9e233309a4106951551f3692657ce9c
scaled-service 254f4815ef36bc9fcc2ce80f82278187c9e233309a4106951551f3692657ce9c
```

This commit changes how Services are discovered (`docker-compose config --services`), how they're associated (by Container ID, rather than config hash or name), and allows for Services to reference multiple Containers (though only the first is directly used for anything at this time).
2019-07-23 13:42:18 -07:00
Jesse Duffield
ea8258d66e more stuff 2019-06-30 11:40:55 +10:00
Jesse Duffield
4e86732cf2 support custom commands that filter down to service names 2019-06-29 21:29:35 +10:00
Jesse Duffield
e220bedc79 support actual mouse support and focusing the main view 2019-06-29 13:41:15 +10:00
Jesse Duffield
dcb8b3329f fix up click events on list panels 2019-06-29 10:22:37 +10:00
Jesse Duffield
ee688746f0 more 2019-06-23 12:27:31 +10:00
Jesse Duffield
014dce909c no more separate code paths for tty container logs 2019-06-23 08:11:16 +10:00
Jesse Duffield
5ab4ef6f8c support docker daemon going down randomly 2019-06-16 12:37:47 +10:00
Jesse Duffield
383f8a51e3 move goroutine call into the NewTask function 2019-06-15 14:51:09 +10:00
Jesse Duffield
344c72f91a allow showing TOP of a container/service 2019-06-15 14:31:49 +10:00
Jesse Duffield
2474c0b34e support custom commands in services and containers panel 2019-06-15 14:08:12 +10:00
Jesse Duffield
3e49e299b9 better support for custom commands 2019-06-10 20:14:44 +10:00
Jesse Duffield
87c6208577 add volumes panel 2019-06-10 18:08:23 +10:00
Jesse Duffield
84090bcb94 support viewing docker compose config from status panel 2019-06-09 12:50:17 +10:00
Jesse Duffield
da645cf173 allow viewing container config in services panel 2019-06-09 12:07:01 +10:00
Jesse Duffield
1246ac1ad3 visually display context tabs 2019-06-09 12:00:53 +10:00
Jesse Duffield
6cc6f61ad1 Speed up startup time
Currently the thing most slowing down startup is calling docker-compose config --hash="*"
Even calling docker-compose config --services, which only returns service names, takes
about half a second. So that's the main bottleneck. We could try and directly obtain the
service names, but we'd then need to have our own algorithm for composing all the
docker-compose files being used, and that gives us more stuff to maintain
2019-06-09 10:59:35 +10:00
Jesse Duffield
9a5a01dfbd fix up rebuild container logic 2019-06-08 22:08:56 +10:00
Jesse Duffield
71f05ff80a more 2019-06-08 13:42:18 +10:00
Jesse Duffield
7e45881dc3 a lot of change 2019-06-08 13:00:37 +10:00
Jesse Duffield
1f5df32141 WIP streaming commands 2019-06-05 23:20:42 +10:00
Jesse Duffield
129c9bbe9e type the translations 2019-06-05 22:20:30 +10:00
Jesse Duffield
f0f96de2b5 WIP on subprocesses 2019-06-03 21:52:25 +10:00
Jesse Duffield
54a5890485 move cursor when a service moves 2019-06-03 20:52:07 +10:00
Jesse Duffield
2f57561c40 more use of waiting statuses 2019-06-03 20:08:42 +10:00
Jesse Duffield
02b735e011 minor fixups 2019-06-02 21:35:03 +10:00
Jesse Duffield
5bf1a40d2f more progress 2019-06-02 17:54:59 +10:00
Jesse Duffield
159a1883e5 fix this insane CPU usage issue 2019-06-02 13:34:26 +10:00
Jesse Duffield
664058d5f0 make config type safe 2019-06-02 11:37:21 +10:00
Jesse Duffield
aa55ff1a8e more progress 2019-06-02 00:28:47 +10:00