Skip to content

Commit 0484520

Browse files
committed
Adding files
1 parent 8221f3a commit 0484520

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

deploy.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
echo "Running deploy script \n"
4+
5+
echo "1/4 Pull new changes\n"
6+
git pull origin main
7+
8+
echo "3/4 Create database if one isn't found \n"
9+
touch database/database.sqlite
10+
11+
echo "2/4 Installing packages using composer\n"
12+
composer install
13+
14+
echo "4/4 Publishing API Platform assets\n"
15+
php artisan api-platform:install
16+
17+
echo "5/4 Migrating database\n"
18+
php artisan migrate
19+
20+
echo "Site has been deployed!\n"
21+

docs/lessons/1_install_api_platform.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ php artisan migrate
6565

6666
6. Make requests to http://127.0.0.1:8000/api/books via Postman
6767

68+
7. Upload to Cloudways via Git/Control panel
6869

70+
8. Change Cloudways PHP version setting to use PHP 8.3
71+
72+
8. Change Cloudways webroot to `public_html/public`
73+
74+
9. SSH onto the VPS copy `.env.test` to `.env`
75+
76+
8. SSH onto the VPS and run commands in ./deploy.sh
6977

7078

0 commit comments

Comments
 (0)