Laravel and droplets: Am I doing it right?

February 24, 2019 1.2k views
Ubuntu PHP Frameworks

So,

  1. I am having laravel act as a backend for an app.
  2. I sat my phpMyAdmin dropblet; connected the laravel image on my laptop to mySQL in phpMyAdmin dropblet.
  3. Now I am creating the app (os/android); and I need to perform GET/POST operations to my laravel backend, however, I am unsure how to upload my laravel image to phpMyAdmin dropblet?

Do I buy a volume? I am afraid that php won’t run in volumes, thus my php files would be static.

1 Answer

Hey friend,

Great question, thanks for asking it here! You only need a storage volume if you need to add storage to your droplet, or have a detachable storage volume that you can move between droplets (like a USB drive). For deploying a Laravel app, I recommend using this tutorial as a guide:

https://medium.com/@abedxh/deploy-laravel-5-4-project-in-ubuntu-16-04-apache-based-server-538d4620bb97

Ubuntu 18 is not much different from 16 in most steps, but you may have to find out how to do something specific to 18 if you run into any particular step that fails (if anything it would probably be package names that contain version numbers).

Now one thing to note, you already have Apache+PHP installed on this droplet, so you’re editing an existing environment. This tutorial is minimal and may have to be adjusted to your needs, but it looks pretty solid to me for your situation.

Jarland

Have another answer? Share your knowledge.