/guest-book-laravel

Demo app for App Platform. This is the repo for the backend.

Primary LanguagePHP

Guest Book Demo Application

This is a demo application for DigitalOcean's App Platform.

This is the backend repo for creating the Laravel API. The overall structure of the demo application is:

  • Laravel: Backend API (Repo)
  • React: Frontend (Repo)

Instructions to Deploy

Deploy to DO

You can use the Deploy to DigitalOcean button to deploy this repo directly to App Platform.

Important Notes on Deployment

  • Make sure you have all your environment variables in place
  • Add a dev database when deploying
  • Build Command: composer install
  • Run Command:
    php artisan migrate --force
    heroku-php-apache2 public/

Environment Variables

The following environment variables are required:

Name Value
APP_URL ${APP_URL}
APP_ENV "production"
APP_KEY "insert-your-app-key"
DB_CONNECTION "pgsql"
DATABASE_URL ${db.DATABASE_URL}
DB_HOST ${db.HOSTNAME}
DB_PORT ${db.PORT}
DB_DATABASE ${db.PASSWORD}
DB_USERNAME ${db.USERNAME}
DB_PASSWORD ${db.PORT}