Internal Documentation
Status
  • πŸ‘‹Welcome
    • πŸ—‚οΈWhat is this?
    • πŸ•Quick Start
    • πŸ’ΈBilling
  • πŸ—ƒοΈExternal Links
    • πŸ—„οΈPublic Documentation
    • πŸ“‹Private GitHub
    • πŸ“‹Public GitHub
    • πŸ—»NetData
    • πŸ“ŠTrello
    • πŸ•°οΈService Monitoring
  • πŸ“Policies
    • Authentication, Access and Accounts
    • Issue and Project Tracking
    • Creation and Managment of Servers or Services
    • Monitoring and Alerting
    • External Access to Systems
    • Management of Documentation
  • πŸ“‹Processes
    • ❔Deploy new Container Stack
    • Limit Bandwidth to Container
    • ❔Create new Virtual Machine
    • Disaster Recovery
    • Port Forwarding or Tunneling a Service
    • Crowdsec Modules
    • Internal IP Range Change
    • SSH Keys
    • Increase Disk on VM
    • Add Wireguard Client
    • ❔New Domain
    • DNS Management
  • πŸ—ΊοΈService Overviews
    • Websites
    • Portainer and GitOps
    • Content Creation
      • Davinci Resolve Server
    • Plex Suite
      • Tdarr
      • Maintainerr
      • Dashdot
      • Overseerr
      • Bazarr
      • Wizarr
      • Plex
      • Tautulli
      • MovieMatch
      • Prowlarr
      • Radarr
      • Sonarr
      • Lidarr
      • FlareSolverr
      • qBittorrent
      • SabNZBD
      • Huntarr
    • Pterodactyl
    • Home Automation & Physical Security
      • Google Assistant
      • Tuya Cloud
      • Home Assistant
    • Infrastructure
      • ❔Cloudflare
      • NextDNS
      • UniFi
      • Synology NAS
      • Proxmox VE
      • Vultr
      • ❔CyberPower PowerPanel & UPS
    • Maintenance & Monitoring
      • AutoHeal
      • Proxmox Backup Server
      • Duplicati
      • Google Drive Sync
      • Ansible
      • UptimeKuma
      • NetData
      • NetbootXYZ
    • Security
      • Bitwarden
      • Google OpenID Auth
      • Wazuh
      • CrowdSec
    • Remote Access
      • Cloudflare Zero Trust
      • ❔UniFi - Wireguard
      • Kasm
    • Other Adhoc Apps
      • ISponsorBlockTV
      • Homebox
      • ❔Hosted Discord Bots
      • LibreChat
      • Imgur
      • Morphos
      • Zapier
      • EpicGames Free Games
      • GitBook
      • Trello
      • StirlingPDF
      • ❔MeTube
    • ❔OpenAI
  • πŸ–₯️Physical Hardware
    • Macaroni
    • Fettuccine
    • Linguine
    • UniFi
  • ‼️Troubleshooting
    • An Introduction...
    • UptimeKuma alerts
    • Portainer
    • Pterodactyl
  • πŸ“–-- Administration --
    • πŸ“ŽGitbook Templates
      • Guide - Root Page
      • Guide - New Docker App
      • Hardware Overview
      • App Overview - Externally Hosted
      • App Overview - Container
      • Miniguide - Compose
      • App Overview - Hosted Discord Bot
Powered by GitBook
On this page
  • Required Knowledge
  • Create Compose file in Github
  • Handling Variables
  • Logging
  • Health Checks
  • Deploy Stack
  • What server?
  • Deploy Stack
  • ENV file required?

Was this helpful?

  1. Processes

Deploy new Container Stack

Required Knowledge

  • How to create Docker Compose files

  • Authentication, Access and Accounts

  • Creation and Managment of Servers or Services

  • External Access to Systems

  • Monitoring and Alerting

  • Management of Documentation

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;

ports:
  - ${PORT:-8200}:8200  #If a $PORT variable is not provided, it will default to 8200
environment:
  - CONFIGFILE=${CONFIGFILE:-/path/to/config.yml} #if the $CONFIGFILE variable is not provided, it will default to /path/to/config.yml

Logging

Each container should have the below to ensure that logging is reduced. The settings can be tweaked where required.

    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3" 

Health Checks

Here are some examples of health checks;

Web UI

    healthcheck:
      test: curl --connect-timeout 15 --silent --show-error --fail -k ://localhost:<>
      interval: 30s
      retries: 3
      start_period: 30s
      timeout: 20s
    labels:
      - "autoheal=true"
    healthcheck:
      test: wget --no-verbose --tries=1 --spider ://localhost: || exit 1
      interval: 30s
      retries: 3
      start_period: 30s
      timeout: 20s
    labels:
      - "autoheal=true"

MongoDB

    healthcheck:
      test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
      interval: 30s
      timeout: 10s
      retries: 5
    labels:
      - "autoheal=true"
    healthcheck:
      test: ["CMD-SHELL", "pidof mongod || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 5
    labels:
      - "autoheal=true"

MariaDB

    healthcheck:
      test: ["CMD", "mariadb-admin", "ping", "-proot", "--password=$MYSQL_PASS_ROOT"]
      interval: 30s
      timeout: 10s
      retries: 5
    labels:
      - "autoheal=true"

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,

  1. Run the below command to CD into the Portainer files

    cd /var/snap/docker/common/var-lib-docker/volumes/portainer/_data/env
  2. Run the below command (correct the file name) to create a new ENV file,

    nano myapp.env
  3. Paste the contents of the ENV file and save it

  4. Update the Docker Compose file to reference the env file per below

        env_file:
          - $ENV
  5. Update the stack and set the ENV variable as below (correct the file name)

    /data/env/myapp.env
  6. Save and stop the stack

  7. Delete and related docker volumes

  8. Pull and deploy the stack

PreviousManagement of DocumentationNextLimit Bandwidth to Container

Last updated 12 months ago

Was this helpful?

Where possible, all containers should have health checks. We utilize the container which will restart unhealthy containers. The intention of this is to automate DR.

SSH into

πŸ“‹
❔
AutoHeal
Portainer host