yum -y install epel-release
yum -y install python-pip
pip install docker-compose
pip install --upgrade pip
yum -y install git
git clone https://github.com/Rynxiao/rap2-docker.git
mkdir -p /opt/mysql/datadir
cd rap2-docker/rap2-delos/
vi docker-compose.yml
然后把 ./docker/mysql/volume改成本地目录/opt/mysql/datadir
# disable this if you have your own mysql
mysql:
container_name: rap2-mysql
image: mysql:5.7.22
# expose 33306 to client (navicat)
#ports:
# - 33306:3306
volumes:
# change './docker/mysql/volume' to your own path
# WARNING: without this line, your data will be lost.
- "/opt/mysql/datadir:/var/lib/mysql"
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --init-connect='SET NAMES utf8mb4;' --innodb-flush-log-at-trx-commit=0
environment:
docker-compose up -d
sleep 30
docker exec -it rap2-delos sh
docker-compose down
docker-compose up -d
后端安装启动完成,然后安装前端
cd ../rap2-dolores/src/config/
vi config.prod.js
// http://xxx.xxx.xxx.xx:38080替换成自己服务器地址,或者域名
module.exports = {
serve: 'http://xxx.xxx.xxx.xx:38080',
keys: ['some secret hurr'],
session: {
key: 'koa:sess'
}
}
改成
module.exports = {
serve: 'http://192.168.1.75:38080',
keys: ['some secret hurr'],
session: {
key: 'koa:sess'
}
}
cd ../../
docker-compose up -d
等安装启动完rap2就安装完成了。
image.png
网友评论