Skip to content

Docker 快速部署

更新于:几秒前
字数统计:181 字
阅读时长:1 分钟

1。安装 dockerdocker-compose

bash
curl -fsSL https://get.docker.com | bash -s docker
curl -fsSL https://get.docker.com | bash -s docker
bash
sudo curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose version
sudo curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose version

不同系统安装命令可能略有差异,详见:Docker Documentation

2。克隆本项目

💡 提醒

此处以 PaiGram 为例,其余项目同理

bash
git clone https://github.com/PaiGramTeam/PaiGram.git
cd PaiGram
git clone https://github.com/PaiGramTeam/PaiGram.git
cd PaiGram

3。修改配置文件

bash
cp .env.example .env
cp docker-compose.gen.yml docker-compose.yml
cp .env.example .env
cp docker-compose.gen.yml docker-compose.yml
dotenv
# MySQL
DB_HOST=mysql
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD="root"
DB_DATABASE=paimon

# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=""
# MySQL
DB_HOST=mysql
DB_PORT=3306
DB_USERNAME=root
DB_PASSWORD="root"
DB_DATABASE=paimon

# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=""

以及 bot token 等参数。详见 Env Settings

4。运行

bash
docker-compose up -d
docker-compose up -d

Contributors

cworld1

Telegram robot, query the official game information.