Comments (9)
I think the TypeScript typings need to be updated as well.
Forgot about it, fixed.
from docker-compose.
@Steveb-p Great suggestion - looking forward to your PR!
from docker-compose.
@AlexZeitler I've looked at the current API, and it does not correspond 1:1 to docker-compose commands. Do you have any particular preference towards naming?
I feel they should be split to 3 different commands?
from docker-compose.
from docker-compose.
What would you suggest (wrt naming/splitting)?
I've went with config
, configServices
& configVolumes
, to roughly keep them "under the same namespace" and designated that they are related to configuration, not actually running containers.
Some code style (eslint) changes went along with the PR, hope you don't mind? I've got them configured automatically according to your project settings, and I didn't notice them until after PR was created ;)
Feel free to request any changes you like, obviously ;)
from docker-compose.
from docker-compose.
@Steveb-p I checked out your PR and I'm trying to understand (mostly because I haven't used config
until now) the exact intention behind splitting config
into three commands.
I tried this (I added commandOptions: ['--services']
to second config
test) which also works to output just the services without volumes:
const std = await compose.config({
cwd: path.join(__dirname),
log: true,
config: 'docker-compose-42.yml',
commandOptions: ['--services']
});
from docker-compose.
@Steveb-p I checked out your PR and I'm trying to understand (mostly because I haven't used
config
until now) the exact intention behind splittingconfig
into three commands.
I was trying to follow upAll
, upMany
, upOne
, buildAll
, etc. That's my reasoning. From my point of view since "helper" functions existed already, then creating three different functions for practically different "queries" would simplify their use for little extra cost of maintaining them.
Should I merge them together and only add some information to docs regarding their additional, potential use?
EDIT: Also, from my experience, docker-compose config
options cannot be mixed together, i.e. you cannot use --services
, --volumes
and --hash="*"
in one call. --service
call takes precendence from my testing, and --volumes
takes precedence over --hash
.
Order in which options are specified is irrelevant.
steveb-p@laptop:~/PhpstormProjects/app$ ./run.sh app config --volumes --services --hash="*"
Checking for presence of external network (app)
Network app does not exist. Creating...
Network app created successfully
Nginx-proxy container running. Checking if it is attached to global network for this instance
app-mongo
app-redis
app-telegraf
app-mysql
app-mongo-events
app-php
app
app-event-parser
app-app-health
app-event-getter
app-migration
steveb-p@laptop:~/PhpstormProjects/app$ ./run.sh app config --volumes --hash="*"
Checking for presence of external network (app)
Network app does not exist. Creating...
Network app created successfully
Nginx-proxy container running. Checking if it is attached to global network for this instance
db-data
steveb-p@laptop:~/PhpstormProjects/app$ ./run.sh app config --hash="*" --services
Checking for presence of external network (app)
Network app does not exist. Creating...
Network app created successfully
Nginx-proxy container running. Checking if it is attached to global network for this instance
app-mongo-events
app-mongo
app-redis
app-mysql
app-php
app
app-migration
app-app-health
app-event-getter
app-telegraf
app-event-parser
steveb-p@laptop:~/PhpstormProjects/app$ ./run.sh app config --hash="*"
Checking for presence of external network (app)
Network app does not exist. Creating...
Network app created successfully
Nginx-proxy container running. Checking if it is attached to global network for this instance
app-mongo-events 983d91d9ce29ce4740452c1f658ec3769abf5ade136c01a3c7486eb75c4d560e
app-mysql ca1ddb7b2000411be89e3288e401ce452a6e03a5da3454e8b48004abdcc2456f
app-redis 6294353200ae7ea68c27c766f6cf093792eb6c43d6b67e1d41b50b15c21663d5
app-mongo f425594061d9f77b16211b002cf5588230d5b1b842abbf2a44ee37ce60a82cea
app-event-parser 25d1bffadfbb03f79b1da501e900b543dde483fc664642216ff9688792161845
app-event-getter db502a854203fd4f34add0bb71d4582b08230e40d1c6a1cd3dad523a132871f0
app-app-health 192a83a9e1b65857ff98f3ade1ed757514c3a6997a5793d43d49789312f70dad
app-migration fa379fae35b3ae192f6613e666f1485a0d71ce5da60dfe3d1592d13d1641ef23
app-php a91f805a9887e91cb5cf98ad9b58854a0a55df890ab1ee8c5791a33bc6520181
app 03ef9018d626cac72aa1eb1ccf283c46f3e933e4f88ec045e34036085459e1b0
app-telegraf aea1335bbeb9271fa92f8aefa3baf385b4d7d96cfc8c7275a974fe1115ac6fb3
from docker-compose.
Ok, then splitting makes perfectly sense.
from docker-compose.
Related Issues (20)
- 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
- Throws: `Error: spawn docker-compose ENOENT` after updating docker to 4.32.0 HOT 3
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.