Skip to content

Useful Commands

There is something to note about the generated configuration. If you scroll to the run section of your configuration, you will see a list of commands. These are commands you can run.

run section

Jumping into the container

Applications are provisioned inside LXD containers. You can jump into the container in the following way:

Terminal window
lxc exec container-name --project project.name -- ash

This will take you inside your container.

Start / Stop / Restart

You can start, stop, and restart your application using the following commands:

Terminal window
rc-service app-name stop
Terminal window
rc-service app-name start
Terminal window
rc-service app-name restart

Migrations

If you use frameworks like Ruby on Rails or Phoenix, you may have to work with migrations. They can be run in the following way.

Terminal window
rc-service app-name migrate

Logs

You can view the logs of your application by using the command

Terminal window
rc-service app-name logs

Console

If your application has console access, you can use the following command.

Terminal window
rc-service app-name console

Running Commands

If you wish to execute commands you can do so using the following:

Terminal window
lxc exec container-name --project project.name -- rc-service app-name [command]