LinuxPatch Appliance Deployment Overview¶
Prerequisites¶
The following conditions are required for the application to function correctly:
-
An operating system with Docker and Docker Compose support.
-
Internet access to download images and clone the repository.
-
The
dockerservice must be installed. -
rootprivileges orsudoaccess to manage containers and directories.
FQDN of the final panel on hostkey.in domain¶
Access to the application is provided via the following pattern:
| Parameter | Value |
|---|---|
| Prefix | linuxpatch |
| Domain | hostkey.in |
| Full Pattern | linuxpatch{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The main application data and configurations are located in the following directories:
-
/root/linuxpatch— the main application working directory, containing the source code (repository) and deployment files. -
/root/linuxpatch/data— the application data directory, including configuration files (.env), certificates (certs), and logs (logs). -
/data/nginx/user_conf.d— the directory for Nginx proxy configuration files.
Application Installation Process¶
Deployment is performed by cloning the https://github.com/linuxpatch/self-hosted.git repository into the /root/linuxpatch directory.
The process includes:
-
Creation of required Docker directories and volumes.
-
Generation of the
.envconfiguration file with unique credentials (database, SMTP, administrator). -
Generation of
docker-compose.ymlbased on a template with environment variable substitution. -
Starting containers via
docker compose up -d.
Permissions and Security¶
-
The
/root/linuxpatchdirectory hasroot:rootownership with mode0644. -
Directories for certificates and logs inside the container (
data/certs,data/logs) have access mode755. -
All credentials (database, SMTP, and administrator passwords) are generated randomly during the initial installation and are stored in the
/root/linuxpatch/data/.envfile.
Databases¶
The application uses two main storage systems:
| DB Type | Image | Purpose |
|---|---|---|
| MySQL (Percona) | percona/percona-server:8.0 | Main application data store |
| Redis | redis:6 | Session storage and caching |
Database data is persisted in Docker named volumes: linuxpatch-mysql-data and linuxpatch-redis-data.
Docker Containers and Execution¶
The application is deployed as a group of containers joined in the linuxpatch-app-network network.
Nginx (Proxy/SSL)¶
-
Image Name:
jonasal/nginx-certbot:latest -
Ports:
80:80,443:443 -
Volumes:
-
nginx_secrets:/etc/letsencrypt -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d
-
-
Environment Variables:
[email protected] -
Restart Policy:
unless-stopped
LinuxPatch App (Main Application)¶
-
Image Name:
linuxpatch/appliance:latest -
Command:
./web -
Ports:
80,443(viaexpose) -
Volumes:
./data:/app/data -
Environment Variables: DB, Redis, SMTP, TLS settings, and administrator credentials.
-
Restart Policy:
unless-stopped
Percona Server (Database)¶
-
Image Name:
percona/percona-server:8.0 -
Command:
mysqld -
Volumes:
linuxpatch-mysql-data:/var/lib/mysql -
Restart Policy:
unless-stopped
Redis (Cache)¶
-
Image Name:
redis:6 -
Command:
redis-server -
Volumes:
linuxpatch-redis-data:/data -
Restart Policy:
unless-stopped
Application Update Instructions¶
Updates are performed by pulling new image versions and restarting the containers:
Permissions Settings¶
The following permissions are set for the correct operation of configuration scripts:
-
The
configure.shfile has execution permissions (0744). -
Data and config directories are created with appropriate access rights to ensure log writing and certificate reading capabilities.
Available Connection Ports¶
| Port | Protocol | Purpose |
|---|---|---|
80 | TCP | HTTP (redirection) |
443 | TCP | HTTPS (primary access) |