PUQ Mautic Skip to main content

Client Container Concept and Structure

Container Deployment

In our deployment scenarios, we use Docker Compose for managing client containers.

Important Directories

The nginx-proxy directory must remain unchanged. Its path is:
/opt/docker/nginx-proxy

This directory contains essential components:

  • docker-compose.yml – Docker Compose configuration
  • certs/ – SSL certificates for domains
  • nginx/ – Nginx configuration files mounted into the container
  • html/ – Web root directory
  • vhost.d/ – Virtual host configurations

List of required directories:

/opt/docker/nginx-proxy /opt/docker/nginx-proxy/certs /opt/docker/nginx-proxy/nginx /opt/docker/nginx-proxy/html /opt/docker/nginx-proxy/vhost.d

Client Container Data Directories

Each client container has its own data directory. The base path for storing user-related Docker files and disk images can be set individually for each n8n workflow involved in service management.

  • The clients_dir option defines the storage directory for user data.
  • Default path: /opt/docker/clients

image-1741877612840.png

Within this directory, subdirectories are created based on the primary domain name of the service. The domain acts as a reference point for the entire service.

Each service directory contains:

image-1741877565421.png

  • docker-compose.yml – Service-specific Docker Compose configuration
  • status – A file storing the container status, which reflects the billing system state (e.g., active, suspended, etc.)
  • nginx/ – Nginx proxy configuration for the domain and container
  • data.img – Disk image for container data

Before a container starts, the data.img file is mounted into the system using n8n automation. The necessary entries are added to /etc/fstab, ensuring that containers automatically restart after a server reboot.