Git Product home page Git Product logo

Comments (8)

Steveb-p avatar Steveb-p commented on July 29, 2024 1

@AlexZeitler I've read through the code and noticed that --follow flag will probably not work when one asks for a container that simply does not end. After all, promises are only resolved when process ends, which practically means there is no way to actually "follow" logs for a running process and - especially - multiple containers.

There is a possibility to handle following logs (or uping a container without actually detaching) if instead of working with a promise we would use JS generators and/or EventEmitters. This can potentially lead to reduction in memory usage, since there might no longer be need to store process output in a variable, but instead rely on user handling our event emission or reading directly from subprocess stdout/stderr (if yielded from generator at some point). This would constitute a major BC tho. WDYT?

btw, do you have any slack or gitter channel?

I've added #60 as work-in-progress / proof-of-concept.

from docker-compose.

AlexZeitler avatar AlexZeitler commented on July 29, 2024

@devshawn Thanks for using docker-compose.
Would you like to implement this feature and send a PR or do you expect it to be available eventually?

from docker-compose.

devshawn avatar devshawn commented on July 29, 2024

I'd be happy to take a stab at it if no one has time for it. It'd be nice to have the option to view logs to the current point as well as streaming it. docker-compose logs vs docker-compose logs --follow.

The latter means the process wouldn't end until the user stops/kills it, but in my case, that's useful. What are your thoughts on this? It appears most commands here run in -d without any user interaction.

from docker-compose.

AlexZeitler avatar AlexZeitler commented on July 29, 2024

Makes sense to me, get going 👍

from docker-compose.

AlexZeitler avatar AlexZeitler commented on July 29, 2024

@devshawn is #38 what you're looking for?

from docker-compose.

devshawn avatar devshawn commented on July 29, 2024

@AlexZeitler - Yes, I believe this would work great! Sorry for not responding, I haven't had time for the project I'm using this for in the past couple of weeks. 👍

from docker-compose.

AlexZeitler avatar AlexZeitler commented on July 29, 2024

@devshawn Great to hear! I've just released it on npm (v0.12.0).
Please let me know if it works for you.

from docker-compose.

AlexZeitler avatar AlexZeitler commented on July 29, 2024

@Steveb-p I created a Slack workspace at https://pdmlab-oss.slack.com.

Just drop me a line with your email address at [email protected] so I can invite you.

from docker-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.