Quickly start a set of containers from your compose project in an ephemeral environment.
run-compose starts a set of containers defined in a compose file
in an ephemeral environment. Similar to
uses compose.yaml (preferable), compose.yml, docker-compose.yaml or
docker-compose.yml file in working directory.
nsc run-compose [--dir <dir>] [--development] [-o <plain|json>]
In the following example,
nsc starts containers using compose file in the
$ nsc run-compose Created new ephemeral environment! (id: 9f8q34lp1v0v6). More at: https://cloud.namespace.so/01gr1g2rpb7ahzddy3f227exq9/cluster/9f8q34lp1v0v6
Afterwards you can SSH into the cluster using the cluster ID from the output:
$ nsc ssh 9f8q34lp1v0v6
and explore the created containers with
$ nerdctl ps
Additionally you can expose any service from the compose file publicly using
nsc expose command with the flag
To specify a working directory from where
nsc loads the compose file.
Specify to enables development facilities, including making containers optional.
run-compose command output format. Supported options are
plain. By default
plain output format is used.
Wait for all containers to start running.