Frequently Asked Questions

Learn how to install and deploy your gcOpen applications

How to Install a Laravel Repository

1
Clone the Repository

First, clone the desired gcOpen repository from GitHub:

git clone https://github.com/gcopen/gcBid.git
cd gcBid
2
Install Dependencies

Install PHP and Node.js dependencies:

composer install
npm install
npm run build
3
Configure Environment

Copy the environment file and configure it:

cp .env.example .env
php artisan key:generate

Edit the .env file with your database credentials and settings.

4
Database Setup

Run migrations to set up the database:

php artisan migrate
php artisan db:seed (optional)
5
Start the Application

Run the Laravel development server:

php artisan serve

Access your application at http://localhost:8000

Steps to deploy on Firebase Hosting:
  1. Install Firebase CLI: npm install -g firebase-tools
  2. Login to Firebase: firebase login
  3. Initialize Firebase in your project: firebase init
  4. Configure Firebase for PHP hosting (using Firebase Functions)
  5. Deploy your application: firebase deploy
Note: Firebase Hosting doesn't natively support PHP. You'll need to use Firebase Functions or set up a reverse proxy to serve your Laravel application.

Deploy using Laravel Forge:
  1. Sign up for Laravel Forge account
  2. Connect your server provider (DigitalOcean, AWS, etc.)
  3. Create a new server and site
  4. Connect your GitHub repository
  5. Configure environment variables in Forge
  6. Deploy with a single click
Benefit: Laravel Forge provides automated deployments, SSL certificates, and server management.

Manual deployment on DigitalOcean:
  1. Create a Droplet with Ubuntu/Debian
  2. Install LEMP stack (Nginx, MySQL, PHP)
  3. Configure Nginx for Laravel
  4. Clone your repository to the server
  5. Set up environment variables
  6. Run migrations and optimize
  7. Configure supervisor for queues (if needed)
Security: Ensure you secure your server with firewalls and regular updates.

Using Laravel Cloud:
  1. Create an account on Laravel Cloud
  2. Connect your GitHub repository
  3. Select your deployment region
  4. Configure environment variables
  5. Choose database and cache settings
  6. Deploy automatically
Advantages: Laravel Cloud offers seamless integration with Laravel applications and automatic scaling.

Common Issues and Solutions

Permission Issues

If you encounter permission errors:

sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache
Composer Install Fails

If composer install fails, try:

composer install --no-scripts
composer run-script post-autoload-dump
Database Connection Issues

Check your .env file for correct database credentials and ensure your database server is running.