Creating a Service Container

How to Create a Service Container

  1. When logged in to the SiteHost Control Panel, click the Containers module from the menu on the left.
  2. Click the Add Container option in the upper right corner of the page.
  3. Select Service Image from the navigation tabs.
  4. Choose the image and select which version you want to use.
  5. Choose a name for your container.
  6. Choose the Port number and Protocol conveniently. Tick the Publish check box if you require the port to be accessible from a remote location (not only on the server).
  7. Type in the SSH Username and SSH Password fields to create a SSH/SFTP user with access to the Node.js Container.
  8. Set Environment Variables filling in the Name and Value text fields.
  9. Click Deploy Container and check the deployment progress presented in the page header.

After a container has been started you can upload files and edit configuration files via SSH/SFTP.

Configuration Files

When connected to a container through SSH you can navigate to the /container/config/ folder which houses the config files for the applications running in a container.

supervisord.conf - This file contains the information used to describe how to run the service like the user and the command to start the application.

Service Config File - This file will be named the same as your service (e.g. mongodb.conf) and will contain all the config for your application.

After editing either file you will need to restart the container through the control panel to apply your changes.

Deugging Your Service

The standard output messages should be logged to the path: /container/application/logs/supervisor/SERVICE_NAME-stdout.log.

The standard error stream should be logged to the file located at: /container/application/logs/supervisor/SERVICE_NAME-stderr.log.