mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Auto-commit on 2024-10-25 01:44:26 by pcx3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
$TTL 1h
|
||||
@ IN SOA {ns1}. {ns2}. (
|
||||
2024101501 ; Serial number
|
||||
2024102401 ; Serial number
|
||||
1h ; Refresh interval
|
||||
15m ; Retry interval
|
||||
1w ; Expire interval
|
||||
|
||||
@@ -19,12 +19,26 @@ services:
|
||||
cpus: 1.0
|
||||
oom_kill_disable: true
|
||||
|
||||
# Malware Scanner used from user panel
|
||||
clamav:
|
||||
image: clamav/clamav:latest
|
||||
container_name: clamav
|
||||
volumes:
|
||||
- /home:/home
|
||||
- ./clamav-db:/var/lib/clamav
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- CLAMD_STARTUP_DELAY=30
|
||||
mem_limit: 0.25g
|
||||
cpus: 0.25
|
||||
|
||||
# OpenPanel service running on port 2083
|
||||
openpanel:
|
||||
image: openpanel/openpanel
|
||||
container_name: openpanel
|
||||
depends_on:
|
||||
- openpanel_mysql
|
||||
#- clamav
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_MODULE
|
||||
@@ -53,6 +67,8 @@ services:
|
||||
- /etc/openpanel/openpanel/custom_code/custom.css:/usr/local/panel/static/css/custom.css
|
||||
- /etc/openpanel/openpanel/custom_code/custom.js:/usr/local/panel/static/js/custom.js
|
||||
- /etc/openpanel/openpanel/conf/knowledge_base_articles.json:/etc/openpanel/openpanel/conf/knowledge_base_articles.json
|
||||
# localization
|
||||
- /etc/openpanel/openpanel/translations/:/etc/openpanel/openpanel/translations/
|
||||
network_mode: host
|
||||
mem_limit: 1g
|
||||
cpus: 1.0
|
||||
|
||||
195
configuration/mysql/initialize/0.4/mariadb_plans.sql
Normal file
195
configuration/mysql/initialize/0.4/mariadb_plans.sql
Normal file
@@ -0,0 +1,195 @@
|
||||
-- MySQL dump 10.13 Distrib 8.0.36, for Linux (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: panel
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.36-0ubuntu0.22.04.1
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `panel`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `domains`
|
||||
--
|
||||
|
||||
CREATE TABLE `domains` (
|
||||
`domain_id` int NOT NULL,
|
||||
`domain_name` varchar(255) NOT NULL,
|
||||
`domain_url` varchar(255) NOT NULL,
|
||||
`user_id` int DEFAULT NULL,
|
||||
`php_version` varchar(255) DEFAULT '8.2'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `plans`
|
||||
--
|
||||
|
||||
CREATE TABLE `plans` (
|
||||
`id` int NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`description` text,
|
||||
`domains_limit` int NOT NULL,
|
||||
`websites_limit` int NOT NULL,
|
||||
`email_limit` int NOT NULL DEFAULT 0,
|
||||
`ftp_limit` int NOT NULL DEFAULT 0,
|
||||
`disk_limit` text NOT NULL,
|
||||
`inodes_limit` bigint NOT NULL,
|
||||
`db_limit` int NOT NULL,
|
||||
`cpu` varchar(50) DEFAULT NULL,
|
||||
`ram` varchar(50) DEFAULT NULL,
|
||||
`docker_image` varchar(50) DEFAULT NULL,
|
||||
`bandwidth` int DEFAULT NULL,
|
||||
`storage_file` text DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `plans`
|
||||
--
|
||||
|
||||
LOCK TABLES `plans` WRITE;
|
||||
/*!40000 ALTER TABLE `plans` DISABLE KEYS */;
|
||||
INSERT INTO `plans` VALUES (1,'ubuntu_nginx_mysql','Unlimited disk space and Nginx',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/nginx',100,'0 GB'),(2,'ubuntu_apache_mysql','Unlimited disk space and Apache',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/apache',100,'0 GB'),(3,'ubuntu_apache_mariadb','Unlimited disk space and Apache+MariaDB',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/apache-mariadb',100,'0 GB'),(4,'ubuntu_nginx_mariadb','Unlimited disk space and Nginx+MariaDB',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/nginx-mariadb',100,'0 GB');
|
||||
/*!40000 ALTER TABLE `plans` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `sites`
|
||||
--
|
||||
|
||||
CREATE TABLE `sites` (
|
||||
`id` int NOT NULL,
|
||||
`site_name` varchar(255) DEFAULT NULL,
|
||||
`domain_id` int DEFAULT NULL,
|
||||
`admin_email` varchar(255) DEFAULT NULL,
|
||||
`version` varchar(20) DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`type` varchar(50) DEFAULT NULL,
|
||||
`ports` int DEFAULT NULL,
|
||||
`path` varchar(255) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` int NOT NULL,
|
||||
`username` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`services` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '1,2,3,4,5,6,7,8,9,10,11,12',
|
||||
`user_domains` varchar(255) NOT NULL DEFAULT '',
|
||||
`twofa_enabled` tinyint(1) DEFAULT '0',
|
||||
`otp_secret` varchar(255) DEFAULT NULL,
|
||||
`plan` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
|
||||
`registered_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`server` varchar(255) DEFAULT 'default',
|
||||
`plan_id` int DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
ADD PRIMARY KEY (`domain_id`),
|
||||
ADD KEY `user_id` (`user_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `fk_sites_domain` (`domain_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `fk_plan_id` (`plan_id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
MODIFY `domain_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
ADD CONSTRAINT `domains_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
ADD CONSTRAINT `fk_sites_domain` FOREIGN KEY (`domain_id`) REFERENCES `domains` (`domain_id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD CONSTRAINT `fk_plan_id` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE SET NULL;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
195
configuration/mysql/initialize/0.4/mysql_plans.sql
Normal file
195
configuration/mysql/initialize/0.4/mysql_plans.sql
Normal file
@@ -0,0 +1,195 @@
|
||||
-- MySQL dump 10.13 Distrib 8.0.36, for Linux (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: panel
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 8.0.36-0ubuntu0.22.04.1
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `panel`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `domains`
|
||||
--
|
||||
|
||||
CREATE TABLE `domains` (
|
||||
`domain_id` int NOT NULL,
|
||||
`domain_name` varchar(255) NOT NULL,
|
||||
`domain_url` varchar(255) NOT NULL,
|
||||
`user_id` int DEFAULT NULL,
|
||||
`php_version` varchar(255) DEFAULT '8.2'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `plans`
|
||||
--
|
||||
|
||||
CREATE TABLE `plans` (
|
||||
`id` int NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`description` text,
|
||||
`domains_limit` int NOT NULL,
|
||||
`websites_limit` int NOT NULL,
|
||||
`email_limit` int NOT NULL DEFAULT 0,
|
||||
`ftp_limit` int NOT NULL DEFAULT 0,
|
||||
`disk_limit` text NOT NULL,
|
||||
`inodes_limit` bigint NOT NULL,
|
||||
`db_limit` int NOT NULL,
|
||||
`cpu` varchar(50) DEFAULT NULL,
|
||||
`ram` varchar(50) DEFAULT NULL,
|
||||
`docker_image` varchar(50) DEFAULT NULL,
|
||||
`bandwidth` int DEFAULT NULL,
|
||||
`storage_file` text DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
|
||||
--
|
||||
-- Dumping data for table `plans`
|
||||
--
|
||||
|
||||
LOCK TABLES `plans` WRITE;
|
||||
/*!40000 ALTER TABLE `plans` DISABLE KEYS */;
|
||||
INSERT INTO `plans` VALUES (1,'ubuntu_nginx_mysql','Unlimited disk space and Nginx',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/nginx',100,'0 GB'),(2,'ubuntu_apache_mysql','Unlimited disk space and Apache',0,10,0,0,'10 GB',1000000,0,'1','1g','openpanel/apache',100,'0 GB');
|
||||
/*!40000 ALTER TABLE `plans` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `sites`
|
||||
--
|
||||
|
||||
CREATE TABLE `sites` (
|
||||
`id` int NOT NULL,
|
||||
`site_name` varchar(255) DEFAULT NULL,
|
||||
`domain_id` int DEFAULT NULL,
|
||||
`admin_email` varchar(255) DEFAULT NULL,
|
||||
`version` varchar(20) DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||
`type` varchar(50) DEFAULT NULL,
|
||||
`ports` int DEFAULT NULL,
|
||||
`path` varchar(255) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
CREATE TABLE `users` (
|
||||
`id` int NOT NULL,
|
||||
`username` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`email` varchar(255) NOT NULL,
|
||||
`services` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '1,2,3,4,5,6,7,8,9,10,11,12',
|
||||
`user_domains` varchar(255) NOT NULL DEFAULT '',
|
||||
`twofa_enabled` tinyint(1) DEFAULT '0',
|
||||
`otp_secret` varchar(255) DEFAULT NULL,
|
||||
`plan` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL,
|
||||
`registered_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`server` varchar(255) DEFAULT 'default',
|
||||
`plan_id` int DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
ADD PRIMARY KEY (`domain_id`),
|
||||
ADD KEY `user_id` (`user_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `fk_sites_domain` (`domain_id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `fk_plan_id` (`plan_id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
MODIFY `domain_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `plans`
|
||||
--
|
||||
ALTER TABLE `plans`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `domains`
|
||||
--
|
||||
ALTER TABLE `domains`
|
||||
ADD CONSTRAINT `domains_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `sites`
|
||||
--
|
||||
ALTER TABLE `sites`
|
||||
ADD CONSTRAINT `fk_sites_domain` FOREIGN KEY (`domain_id`) REFERENCES `domains` (`domain_id`);
|
||||
|
||||
--
|
||||
-- Constraints for table `users`
|
||||
--
|
||||
ALTER TABLE `users`
|
||||
ADD CONSTRAINT `fk_plan_id` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE SET NULL;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
@@ -10,5 +10,5 @@ location /openadmin {
|
||||
|
||||
# roundcube
|
||||
location /webmail {
|
||||
return 301 https://webmail.localhost/;
|
||||
return 301 http://127.0.0.1/;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,12 @@
|
||||
"on_dashboard": true,
|
||||
"real_name": "openpanel_dns"
|
||||
},
|
||||
{
|
||||
"name": "Malware Scanner",
|
||||
"type": "docker",
|
||||
"on_dashboard": false,
|
||||
"real_name": "clamav"
|
||||
},
|
||||
{
|
||||
"name": "SSL",
|
||||
"type": "docker",
|
||||
|
||||
@@ -23,9 +23,7 @@ ns3=
|
||||
ns4=
|
||||
email=
|
||||
logout_url=
|
||||
enabled_modules=dns,favorites,phpmyadmin,temporary_links,ssh,crons,backups,wordpress,pm2,disk_usage,inodes,usage,terminal,services,webserver,fix_permissions,process_manager,ip_blocker,redis,memcached,login_history,activity,twofa,domains_visitors
|
||||
|
||||
available_modules=malware_scan, elasticsearch
|
||||
enabled_modules=dns,favorites,phpmyadmin,temporary_links,ssh,crons,backups,wordpress,flarum,pm2,disk_usage,inodes,usage,terminal,services,webserver,fix_permissions,process_manager,ip_blocker,redis,memcached,login_history,activity,twofa,domains_visitors
|
||||
|
||||
[USERS]
|
||||
password_reset=no
|
||||
|
||||
17
configuration/skeleton/notifications.yaml
Normal file
17
configuration/skeleton/notifications.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
notify_account_login=1
|
||||
notify_account_login_for_known_netblock=1
|
||||
notify_account_login_notification_disabled=1
|
||||
notify_autossl_expiry=0
|
||||
notify_autossl_expiry_coverage=0
|
||||
notify_autossl_renewal_coverage=0
|
||||
notify_autossl_renewal_coverage_reduced=0
|
||||
notify_autossl_renewal_uncovered_domains=0
|
||||
notify_contact_address_change=1
|
||||
notify_contact_address_change_notification_disabled=1
|
||||
notify_disk_limit=1
|
||||
notify_email_quota_limit=1
|
||||
notify_password_change=1
|
||||
notify_password_change_notification_disabled=1
|
||||
notify_ssl_expiry=1
|
||||
notify_twofactorauth_change=1
|
||||
notify_twofactorauth_change_notification_disabled=1
|
||||
Reference in New Issue
Block a user