1、安装docker
yum -y install docker
yum -y install composer
yum -y install docker-compose
2、启动docker服务
service docker start
3、测试安装结果
docker-compose --version
4、创建目录
mkdir /data/continus-deploy
5、写入docker-compose.yml
version: "3.8"
services:
renewal-redis:
image: redis:alpine
volumes:
- ${PWD}/redis:/data
renewal-fpm:
image: potato-plan-docker.pkg.coding.net/renewal/prod/renewal-api:202030.414
depends_on:
- "renewal-redis"
ports:
- "127.0.0.1:9002:9000"
volumes:
- ./storage:/var/www/html/storage
env_file:
- ${PWD}/.env
renewal-queue:
image: potato-plan-docker.pkg.coding.net/renewal/prod/renewal-api:202030.414
depends_on:
- "renewal-redis"
volumes:
- ./storage:/var/www/html/storage
restart: on-failure
env_file:
- ${PWD}/.env
6、创建.env文件
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:rTBidZRDhQpb10HI3PcJ7C1/hgoLSvUeflNBDRgzHiA=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
7.在coding里选择这个
8.在流程配置中添加你所想要的配置即可