βDeploy new Container Stack
Required Knowledge
How to create Docker Compose files
Create Compose file in Github
Handling Variables
When variables are used, such as variables for Ports, please use the ${VARIABLENAME:-DefaultValue}
structure. This ensures that if the variable is not set, it will be set to the default rather than null. Some containers will not start with null variables. Some example use cases;
Logging
Each container should have the below to ensure that logging is reduced. The settings can be tweaked where required.
Health Checks
Where possible, all containers should have health checks. We utilize the AutoHeal container which will restart unhealthy containers. The intention of this is to automate DR.
Here are some examples of health checks;
Web UI
MongoDB
MariaDB
Deploy Stack
What server?
Pick a server that is relevant to the use-case.
If the app relates to Plex, the container should be installed on the same host as the Plex server
If the app requires a GPU, the container should be on a server with a GPU
If the app relates to Pterodactyl, it should be installed on the same server as either the panel or wings.
Etc
Deploy Stack
ENV file required?
If an ENV file is required,
SSH into Portainer host
Run the below command to CD into the Portainer files
Run the below command (correct the file name) to create a new ENV file,
Paste the contents of the ENV file and save it
Update the Docker Compose file to reference the env file per below
Update the stack and set the ENV variable as below (correct the file name)
Save and stop the stack
Delete and related docker volumes
Pull and deploy the stack
Last updated