当前位置:网站首页>Swift rapid development

Swift rapid development

2022-06-25 04:49:00 Oglie's magic slippers~

1.swoft file

https://www.swoft.org/documents/v2/basic-components/aop/
https://www.bookstack.cn/read/Swoft/zh-CN-quickstart-docker-installation.md

2.swoft Environment building

Use docker Image mount swoft

docker run -p 18306:18306 --name swoft swoft/swoft

start-up swoft

docker start swoft

http visit swoft:http:// virtual machine ip: port
example :http://192.168.118.128:18306/

3.swoft Development

Using shortcuts ,swoft After container creation , The project code is in docker Containers swoft in (/var/www/swoft)
For quick development, the code is still here , But we need to make some connections

stay window On the development , Code managed to github, stay swoft In the container git pull Synchronization code
Subsequent operations need to create an empty swoft Warehouse

Implementation steps

Get into swoft Containers

docker exec -it swoft /bin/bash

swoft Containers , install ssh-client Easy to pull code

apt-get update
apt-get install ssh-client

swoft Containers , Generate ssh The key , And bind to your own github account number

ssh-keygen -t rsa -C " mailbox @yeah.net"
vim /root/.ssh/id_rsa.pub

swoft The container pulls the complete project code from the source project (composer install Pull vender It is difficult to , Always fail , Fortunately, the project comes with )

composer install

Go to github Create an empty project
relieve remote origin Source , And connect our own github Empty item

git remote -v
git remote rm origin
git remote add origin < The newly created github Project address >

modify .gitignore, Delete vender Limit , take vender Also upload to your own github project

vim .gitignore

Upload items to your own gitbun
Set according to the prompt config, Configure mailbox user name

git add .
git commit -m"update"
git push origin master

Start using

After the above configuration is completed , Can be in window And other environmental development projects , Submit in swoft In the container git pull debugging

git pull origin master
原网站

版权声明
本文为[Oglie's magic slippers~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202210533330830.html