How To

Run a one-off migration task after deploying a service

Using a Toolbox (Coherence's web-hosted cloud shell) it's easy to get access to a REPL or OS shell in your service's container in any given environment.

Launch a new toolbox in the environment from the context menu.

Start the toolbox

After launching the toolbox you'll end up in a VSCode editor. Open a new terminal window from the menu at the top.

Full-screen terminal

You can make the terminal full-screen with the ^ button on the terminal tab.

Use the cocli exec command to run your migration script.

For example:

cocli exec SERVICE_NAME COMMAND --FLAG ARG1 ARG2
Previous
Add environment variables