四合一云面板
项目地址:xsidc/cdntip
演示效果
搭建教程
1. 安装docker,以ubuntu为例
其他版本请参考 这里
apt-get remove docker docker-engine docker.io containerd runc
apt-get update && apt-get install -y ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
curl -L https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose
2.创建运行目录及文件
mkdir openpanel && cd openpanel
cat > docker-compose.yml <<EOF
version: '3'
networks:
openpanel:
services:
mysql:
image: mysql:5.7.8
container_name: mysql
restart: always
hostname: mysql
environment:
MYSQL_ROOT_PASSWORD: openpanel
MYSQL_DATABASE: openpanel
MYSQL_USER: openpanel
MYSQL_PASSWORD: openpanel
volumes:
- ./data:/var/lib/mysql
openpanel:
image: xmg66/openpanel3
container_name: openpanel
volumes:
- ./database.conf:/home/python/panel/config/database.conf
ports:
- "8080:80"
depends_on:
- mysql
EOF
-
数据库配置文件,在该路径下创建一个
database.conf
文件,按需修改即可。cat > database.conf <<EOF [client] host = mysql port = 3306 database = openpanel user = openpanel password = openpanel default-character-set = utf8 EOF
3.启动容器
docker compose up -d
4.设置用户账户
- 进入容器:
docker exec -it openpanel /bin/bash
- 创建管理员命令, 根据提示创建即可:
python3 manage.py createsuperuser
- 添加aws镜像(可选?):
python manage.py aws_update_images
5.进入网页端
输入你 服务器的ip:8080
即可进入网页控制端。
- 至于提取api的教程就
自行寻找
吧
评论区