Deployment Overview of Restyaboard on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu (recommended).
-
Privileges: Root or sudo access is required for package installation and Docker management.
-
Ports:
-
80(HTTP) - For SSL certificate challenges via Certbot. -
443(HTTPS) - For secure web traffic. -
8080(Internal) - Used by the application container for local proxying.
FQDN of the final panel on the hostkey.in domain¶
The application is accessible via a specific subdomain template based on your server ID.
| Parameter | Value |
|---|---|
| Prefix | restyaboard |
| Domain | hostkey.in |
| Full template | restyaboard{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The following directories are created or utilized on the host system for data persistence and configuration:
-
/opt/restyaboard/postgres: Persistent storage for the PostgreSQL database. -
/opt/restyaboard/uploads: Persistent storage for application uploads. -
/root/nginx: Contains the Nginx proxy configuration files. -
/data/nginx/user_conf.d: Stores user-specific Nginx configuration files.
Application Installation Process¶
The installation process involves setting up the runtime environment and deploying the application components via Docker:
-
System Preparation: The system package cache is updated, and
Docker CE,CLI,containerd.io, and thedocker-compose-pluginare installed if they are not already present. -
Network Setup: A dedicated Docker network named
restya_netis created to facilitate communication between containers. -
Database Initialization:
-
A PostgreSQL container (
postgres:15) is launched. -
A database named
restyaboardand a user namedrestyaare created within the instance. -
Application Deployment: The Restyaboard application (version
v1.7.1) is deployed as a Docker container, connecting to the database via the internal network. -
Schema Initialization: If the database is empty, the installation script automatically detects and imports the required SQL schema from the application image into the database container to ensure all tables are present.
Access Rights and Security¶
-
Firewall: The system relies on Nginx to proxy traffic from external ports (80/443) to the internal application port (8080).
-
Network Isolation: Application containers communicate over a private Docker network (
restya_net), preventing direct exposure of the database to the host's public interface.
Databases¶
The application uses PostgreSQL for data storage.
| Component | Details |
|---|---|
| Engine | postgres:15 |
| Database Name | restyaboard |
| Admin User | postgres |
| Application User | restya |
| Storage Location | /opt/restyaboard/postgres |
Docker Containers and Their Deployment¶
The deployment consists of three main container components:
PostgreSQL Container¶
-
Image:
postgres:15 -
Container Name:
restya_db -
Network:
restya_net -
Volumes:
/opt/restyaboard/postgres:/var/lib/postgresql/data -
Restart Policy:
unless-stopped
Restyaboard Application Container¶
-
Image:
restyaplatform/restyaboard:v1.7.1 -
Container Name:
restya_app -
Network:
restya_net -
Ports:
127.0.0.1:8080:80 -
Environment Variables:
-
POSTGRES_HOST=restya_db -
POSTGRES_PORT=5432 -
RESTYA_DB=restyaboard -
Restart Policy:
unless-stopped
Nginx Proxy Container¶
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Volumes:
-
nginx_secrets:/etc/letsencrypt -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d -
Restart Policy:
unless-stopped
Application Update Instructions¶
To update the Restyaboard application, perform the following steps:
-
Pull the latest images for the application and database.
-
Recreate the containers using Docker Compose or by running the updated container images.
-
If a schema change is required, ensure the SQL migration files are applied to the PostgreSQL instance.