app部署代码, config配置文件,data附属数据的持久化存储,mnt共享区
-
更新系统
-
安装Docker
-
创建部署用户, 并赋予Docker 权限
sudo usermod -aG docker deployer
-
初始化部署目录
cd ~/apps/ git clone https://github.com/agideo/docker-deployment.git <app_name>
-
cp docker-compose.yml.example docker-compose.yml
-
添加public key 到 config/ssh_authorized_keys
-
docker-compose up -d
-
check ssh-agent
de chown root: ~/.ssh/authorized_keys de chmod 600 ~/.ssh/authorized_keys
-
check cap
de cap production deploy:check de cap production deploy
-
check rails
-
docker nginx config
-
server nginx config
-
setting cdn
-
ssl 证书
curl https://get.acme.sh | sh
acme.sh --issue -d wzhw-wxsc2.s168.do8.cc -w /home/deployer/apps/wzhw_wxsc2_deploy/app/shared/public
acme.sh --installcert -d wzhw-wxsc2.s168.do8.cc \
--keypath /home/deployer/apps/wzhw_wxsc2_deploy/ssl/wzhw-wxsc2.s168.do8.cc.key \
--fullchainpath /home/deployer/apps/wzhw_wxsc2_deploy/ssl/wzhw-wxsc2.s168.do8.cc.pem \
--reloadcmd "sudo service nginx reload"
- 测试证书会自动更新
- 设置sentry
- 设置sentry 会自动gengx
- 设置数据库备份
- 设置数据库备份检查