CLI#26
Conversation
|
To extend this, I would like for it to checkout the latest prod release in pubky-stack. For that we need to publish the refs and this cli can read them. A github page should do. |
| require_command git | ||
| require_command docker | ||
|
|
||
| if ! docker compose version >/dev/null 2>&1; then |
There was a problem hiding this comment.
you could use function require_command, but it should take two args, the first one is command itself(docker, git, docker compose) and the second is how to validate it(-v, version.
Also it's worth to mention, that sometimes docker compose could be a separate package and has it's own binary, like docker-compose.
There was a problem hiding this comment.
I believe docker-compose to be deprecated
| fi | ||
| } | ||
|
|
||
| check_github_access() { |
There was a problem hiding this comment.
don't sure we should use this checks, at some point we run git commands and they will fail if no access.
There was a problem hiding this comment.
true, it catches earlier. I could remove it and it will exit with error still.
| profiles+=(--profile pubky-app) | ||
| fi | ||
|
|
||
| if [ "${#BUILD_SERVICES[@]}" -gt 0 ]; then |
There was a problem hiding this comment.
this doesn't support public docker images, that we will have.
There was a problem hiding this comment.
correct, the intention of the cli is for convenience of local builds. I think the readme makes that clear.. we could support both but that is simply running up
There was a problem hiding this comment.
I'll reword the Readme. Once we have consistent up-to-date dockerhub images that can be the recommended use.
For contributors and local development, pubky-docker.sh handles all git and docker commands for you to clone the service repositories, checks out the refs you choose, builds Pubky images from source, and starts the stack.
The script will: