PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Personal Git Repo Fails to Deploy

Solved
dschiffer12

Feb 6th, 2023 10:40 AM

Hi there, I have spent all weekend troubleshooting and can't seem to figure out what the issue is. I've even gone to the extent of signing up for Forge, going through their process, only to have the deploy fail. I am able to deploy successfully to Digital Ocean when using the devdojo/wave github repo. But when I try deploying an application through DO using my own repo, which is just a clone of the original with the added pro templates, I am unable to get it to successfully deploy. I don't even remember all of the issues I troubleshooted through - missing Laravel files, etc. The biggest one now seems to be issues with the PHP version. I was originally deploying 8.3, but a component requires 7.2... and so I just recently wiped everything to start clean, fresh git repo, fresh install, etc... and it still fails. I'm editing the .env accordingly, ensuring ssh keys are correct and database connections are active... is there anything else I could be missing that is contributing to my massive frustration?! Ha, thanks for your help.

bobbyiliev

Feb 7th, 2023 12:50 AM

Hi there,

You can think of Wave as a standard Laravel application, there should not be anything that is too different.

It is hard to give any suggestions without seeing the error that you are facing.

Some general suggestions:

  • Use PHP 8.1 or 8.0
  • Make sure to check the Laravel logs for more information about the error that you are seeing
  • Share the exact error that you are seeing in the logs here so I could advise you further

If you wish you can give me access to your Forge account and I can deploy this for you. Feel free to send me a message with the credentials and I will set this up for you, then you can change the credetials again.

dschiffer12

Feb 7th, 2023 07:08 PM

Hi there, thanks for getting back to me. It seems the main issue I'm having now has to do with the sql server. This is the error I'm getting:

INFO  Running migrations.  

  2014_10_12_100000_create_password_resets_table .................... 7ms FAIL

In Connection.php line 760:
                                                                               
  SQLSTATE[HY000]: General error: 3750 Unable to create or change a table wit  
  hout a primary key, when the system variable 'sql_require_primary_key' is s  
  et. Add a primary key to the table or unset this variable to avoid this mes  
  sage. Note that tables without a primary key can cause performance problems  
   in row-based replication, so please consult your DBA before changing this   
  setting. (SQL: create table `password_resets` (`email` varchar(191) not nul  
  l, `token` varchar(191) not null, `created_at` timestamp null) default char  
  acter set utf8mb4 collate 'utf8mb4_unicode_ci')                              
                                                                               

In Exception.php line 18:
                                                                               
  SQLSTATE[HY000]: General error: 3750 Unable to create or change a table wit  
  hout a primary key, when the system variable 'sql_require_primary_key' is s  
  et. Add a primary key to the table or unset this variable to avoid this mes  
  sage. Note that tables without a primary key can cause performance problems  
   in row-based replication, so please consult your DBA before changing this   
  setting.                                                                     
                                                                               

In PDOStatement.php line 117:
                                                                               
  SQLSTATE[HY000]: General error: 3750 Unable to create or change a table wit  
  hout a primary key, when the system variable 'sql_require_primary_key' is s  
  et. Add a primary key to the table or unset this variable to avoid this mes  
  sage. Note that tables without a primary key can cause performance problems  
   in row-based replication, so please consult your DBA before changing this   
  setting.                                           

I've gone as far as connecting to the sql server and creating the PK's manually, but still receive the same error. Any ideas on this one?

bobbyiliev

Feb 8th, 2023 12:32 AM

Hi there,

What version of MySQL are you using and is it a Managed DigitalOcean MySQL database cluster or just MySQL installed on your server?

What you could do is to set the sql_require_primary_key to OFF in your MySQL config file and then restart the MySQL instances so that way it will no longer be required.

If you are using a Managed Database, you could do that via the DigitalOcean API as described in the docs here.

Let me know how it goes!

dschiffer12

Feb 9th, 2023 08:14 AM

Best Answer

Hi Bobby, thanks for your help - I really appreciate it. I was able to successfully deploy. I tried pushing the API calls to change the sql_require_primary_key, but was having issues. I decided to delete the server and start over. Upon creating the new server, I deployed mongoDB 6 instead of mySQL. That did the trick and everything is running beautifully. I've been in a hyper-focus over it the past few weeks, ha my background is in data science and spatial analytics - I had never worked with php or Laravel before, and I'm loving it. I primarily use python, react and nodejs. So I'm very excited to be learning these new technologies through the devdojo platform.

bobbyiliev

Feb 10th, 2023 04:54 AM

Happy to hear that you've got it all working now! Good luck with your project and feel free to post new questions in case anything else pops up!

Report
1