@@ -65,14 +65,53 @@ php artisan migrate
6565
66666 . Make requests to http://127.0.0.1:8000/api/books via Postman
6767
68- 7 . Upload to Cloudways via Git/Control panel
68+ ## Cloudways
6969
70- 8 . Change Cloudways PHP version setting to use PHP 8.3
70+ 7 . Login to Cloudways and add a server with the following details:
71+ - Application = PHP Custom App
72+ - Application name = book-app
73+ - Server name = demo
74+ - Project = book-app
75+ - Server = DigialOcean
76+ - Server size = 1GB
77+ - Location = London
7178
72- 8 . Change Cloudways webroot to ` public_html/public `
79+ 8 . From Servers -> demo -> Settings and Packages -> Packages update the PHP version to PHP 8.3
7380
74- 9 . SSH onto the VPS copy ` .env.test ` to ` .env `
81+ 9 . From Applications -> book-app -> Application Settings Change the webroot from ` public_html ` to ` public_html/public `
7582
76- 8 . SSH onto the VPS and run commands in ./deploy.sh
83+ 10 . From Applications -> book-app -> Deployment via Git click on Generate SSH Keys
7784
85+ 11 . Once SSH keys have been created view and copy key
7886
87+ ## GitHub
88+
89+ 12 . Log in to GitHub and go to repository ` https://github.com/howToCodeWell/laravel-book-api `
90+
91+ 13 . From Settings -> Deploy keys click add deploy key
92+
93+ 14 . Paste copied key and give it the title of ` Cloudways ` . Click on add key.
94+
95+ ## Cloudways
96+
97+ 15 . From Applications -> book-app -> Deployment via Git add git remote address ` git@github.com:howToCodeWell/laravel-book-api.git ` and click authenticate
98+
99+ 16 . From Applications -> book-app -> Deployment via Git select main branch and click start deployment
100+
101+
102+ ## SSH
103+ 17 . SSH onto the VPN use credentials found in Servers -> demo -> Master Credentials
104+
105+ 18 . Go to applications/<app >/public_html
106+
107+ 19 . SSH onto the VPS copy ` .env.test ` to ` .env `
108+
109+ 20 . Create database file ` touch database/database.sqlite `
110+
111+ 21 . Install composer ` composer install `
112+
113+ 22 . Install assets ` php artisan api-platform:install `
114+
115+ 23 . Migrate the database ` php artisan migrate `
116+
117+ 24 . View app in browser
0 commit comments