Comments (8)
@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 up
ing 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.
@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.
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.
Makes sense to me, get going 👍
from docker-compose.
@devshawn is #38 what you're looking for?
from docker-compose.
@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.
@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.
@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)
- the down method doesn't appear to work HOT 15
- Error running commands on Electron HOT 1
- Add a way to get progress report
- doubt docker-compose HOT 5
- Cannot create a string longer than 0x1fffffe8 characters HOT 9
- Error running docker-compose HOT 5
- adding a option to set COMPOSE_HTTP_TIMEOUT variable HOT 2
- spawn docker-compose ENOENT on Gitlab CI HOT 1
- rm and stopMany methods have an inconsistent API HOT 10
- How to use npm package docker-compose inside an active container? HOT 5
- ps doesn't output all services -> offset of 1 service HOT 1
- Output ends up in "err" instead of "out" on macos even when exitCode equals 0 HOT 8
- execCompose can throw "RangeError: Invalid string length" HOT 1
- Down options like downOne and downMany HOT 3
- Version 0.24.4 broke packages using that dependency HOT 1
- Support for docker compose watch HOT 3
- integration of list commands HOT 2
- passing env object causes issues HOT 2
- Improve detection if "--detach" should be set HOT 2
- Docker-Compose V2 && ESM + TypeScript HOT 4
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.