How do I deploy my Laravel project?
- In the panel, open My servers and click your server.
- On the Overview tab, wait for the App row to say "Laravel is ready". The page refreshes itself.
- Open the link in the Site address row. You see the Laravel welcome page.
Bringing your own code
Connect over SSH and switch to the project user:
su - app
cd /var/www/laravel
The project lives here. After copying your own code in, run:
composer install --no-dev
php artisan migrate --force
php artisan config:cache
The .env file is ready, so do not overwrite it. The database name and user are both laravel, and the password is in the panel.
What comes ready
- The queue worker is the
laravel-kuyrukservice. Runsystemctl restart laravel-kuyrukwhen your code changes. - The scheduler runs every minute (
/etc/cron.d/laravel).
Your own domain
- Point your domain's A record to your server's IP address.
- As root, replace the old name everywhere:
sed -i 's/OLD_NAME/yourdomain.com/g' /etc/caddy/Caddyfile.OLD_NAMEis the part afterhttps://in the address shown in the panel. - Run
systemctl reload caddy.
Caddy gets and renews the certificate by itself.
Also update APP_URL in the .env file. Only 80, 443 and 22 for SSH are open to the outside.
No server yet? Order a server with Laravel installed: you choose the size and pay for what you choose.
Thanks for your feedback!