ROAST Setup/MySQL - HOW do I operate it?

Hi, I bought the book and have been having a heck of a time getting docker setup properly to continue smooth sailing. I installed spin and I’m using the fpm-apache docker image. I was able to get everything somewhat working for only a few more pages… the book doesn’t explain any of the docker stuff, so it’s getting frustrating. :expressionless:

I spent several hours just trying to get everything working properly. There’s a lot not actually explained. I just wanted to build the project and every few pages I have to scour the internet and figure out how to fill in the gaps.

I finally realized I had to connect to mysql via workbench locally after the container starts up to create the test database. I keep running into issues with mysql stuff caching. It cached a typo in my compose file or something and I wasn’t able to login as root or “fix” the typo with spin down/up. I started over and made sure the mysql credentials matched and I was finally able to create roast_api_test schema… next step in the book was running the test… 7 Failed with "Access Denied for non-root db user. I’d fix it via CLI, but idk how to get a mysql prompt in the container.

I’m trying to follow along with the book and step after step… unexplained issues that go back to the docker setup not being explained/covered at the beginning. It probably could’ve be explained with a few sentences, but trying to debug on my own every few pages is disappointing. Doesn’t help that I keep coming across dead links to gitlab and partially explained steps/docs. Very frustrating. Can you please help me stabilize my docker setup/mysql so I don’t keep having issues? Thanks.

I was able to get a little further… I was able to access the mysql prompt with:
docker exec -it containerID mysql -uroot -p

I granted privileges to the roast_user… then did php artisan test again… 5 passed… the other 4 failed:

1) Tests\Feature\Auth\AuthenticationTest::test_users_can_authenticate_using_the_login_screen
The user is not authenticated
Failed asserting that false is true.

/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php:49
/var/www/html/tests/Feature/Auth/AuthenticationTest.php:22
/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:173

2) Tests\Feature\Auth\PasswordResetTest::test_reset_password_link_can_be_requested
The expected [Illuminate\Auth\Notifications\ResetPassword] notification was not sent.
Failed asserting that false is true.

/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php:83
/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:353
/var/www/html/tests/Feature/Auth/PasswordResetTest.php:23
/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:173

3) Tests\Feature\Auth\PasswordResetTest::test_password_can_be_reset_with_valid_token
The expected [Illuminate\Auth\Notifications\ResetPassword] notification was not sent.
Failed asserting that false is true.

/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/NotificationFake.php:83
/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:353
/var/www/html/tests/Feature/Auth/PasswordResetTest.php:45
/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:173

4) Tests\Feature\Auth\RegistrationTest::test_new_users_can_register
The user is not authenticated
Failed asserting that false is true.

/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php:49
/var/www/html/tests/Feature/Auth/RegistrationTest.php:21
/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:173

Triple checked everything up to this point, but the book says:

“You should have fully green tests since we haven’t added any features yet! If you do get an error, make sure your database is connected and everything is namespaced correctly.”

It’s definitely connected and namespaces correctly :man_facepalming:

P.S. the book says:

“If you purchased the complete package and have access to the source code, you can always browse the tests directory for a variety of different examples of API feature tests.”
I purchased the complete package - how do I get the code? Gumroad doesn’t have a link for it for the Vue 2 or Vue 3 versions.

I will get to this soon, just wanted to let you know that it’s in my inbox and on my radar.

It seems like you’ve made a lot of changes and attempted a lot of different things.

There are a number of emails and posts that we have from you.

To make sure I address everything correctly, can you give me an updated list of what you need help with?

If you use sub headings for an issue title and a small paragraph of what you’re trying to do underneath that would make it a lot easier for me to help you :raised_hands:

1 Like

Sorry for the delay… today and yesterday have been super busy. I was hoping to get an updated list from you to make sure I am answering everything, but I’ll give it my best.

It will not talk about the Docker stuff. We threw in the Docker stuff as a freebie to help others if they needed it. Writing about how to deploy ROAST with Docker would be a whole separate book in itself :sweat_smile:

It seems like you’re taking the code and immediately modifying it to use for your own (especially when you said you changed out the image for Apache).

If you’re specifically trying to get ROAST to run, I can definitely help you with that.

If you’re taking things and modifying things, I can guide you to the best of my ability, but you’ll likely need some time exploring other resources on the Internet if you’re trying to get this to work for your own needs. This is not a book on Docker.

Did you complete these steps? https://www.notion.so/521dimensions/How-to-activate-your-access-0aea2c297eae4d59a3a0aaa3a840e482?pvs=4

To get the code:

  1. Go to https://id.serversideup.net/account/products
  2. You will then find a place to access your products

Unfortunately there is a bug in the tests that @danpastori is aware of. We’re continuously improving the application with the new Nuxt 3 set up and will have this fixed soon. This is part of the Laravel 10 upgrade that will also be included with the book.

Moving forward

If you run into any other issues, feel free to throw a message on here and I’ll get back to you!

1 Like

Sorry! I did make a list/respond. I didn’t realize you posted on here - I replied to the email :joy:

Thanks for addressing everything. Idk why I thought the book would cover docker. My main frustration with it was no ROAST Docker files or explaination. The first time I tried to get the source code, gitlab 404ed after I created an account, which is why I was trying to build my own image for ROAST. I was able to access the code from the link you just posted though, so I’ll try those docker-compose files if I have anymore issues - thanks. Have you thought about a book on docker/spin? :thinking: I’d probably buy it lol.

Ah it would’ve been nice to know that it was just a laravel auth test bug :joy: Should I wait for the laravel 10 upgrade to continue?

Just a heads up on this, we are moving from Gumroad → LemonSqueezy and GitLab → GitHub.

During this transition to GitHub, I fixed numerous bugs from the new API and I have things clearly documented to get started.

We’re currently waiting to hear back from LemonSqueezy support to complete our migration from Gumroad and we’ll send out the new repository invitations shortly after :+1:

Great haha that’ll further complicate the state of book/resources, but thanks for the heads up!

I just finished the book and I’m kinda confused. I thought the Nuxt 3 version had the complete Laravel guide - with the Next 3 mobile part coming soon. I was actually kinda shocked with how it ends as I spent quite a bit of time following along and it basically concludes with nothing physically usable. I did everything in the order and kept waiting for directions on how to access the Registration/Login to test it, but it never tied the pieces together to do so.

I was going to try and figure out how to “complete” it up to where the book stops by looking at the repo, but the current state of the Nuxt 3 repo doesn’t match the book - there’s no useAuth or useUser composable, so idk if I’ll be able to seamlessly pick back up when the rest of the book is released. I’m getting access control check errors, so I’d really like to have an actual testable page that aligns with where the book stops.

How can I test the Registration/Login functionality to see if my API and frontend were done correctly up to this point? Will you be releasing chapters as they’re finished, or will they all be released together? Also… when can I expect to see them?

Thanks!

Figured I’d chime in since we are now in a more “code-based” conversation.

Great haha that’ll further complicate the state of book/resources, but thanks for the heads up!

Our intention is not to make this process more difficult. I hope you find the ease of using GitHub a little more straight forward then the process has been. We are still learning and optimizing. You will be able to have discussions right in the code base where I can reference and fix with less moving parts.

I just finished the book and I’m kinda confused. I thought the Nuxt 3 version had the complete Laravel guide - with the Next 3 mobile part coming soon. I was actually kinda shocked with how it ends as I spent quite a bit of time following along and it basically concludes with nothing physically usable. I did everything in the order and kept waiting for directions on how to access the Registration/Login to test it, but it never tied the pieces together to do so.

The code base has been pushed, but the chapters explaining the code are still being written and released. We plan on releasing them in batches as they are finished. If you followed the set up instructions for the sanctum install and downloaded the latest chapters, we design components for registration and authentication. If you are having issues with those processes, feel free to open a thread.

I was going to try and figure out how to “complete” it up to where the book stops by looking at the repo, but the current state of the Nuxt 3 repo doesn’t match the book - there’s no useAuth or useUser composable, so idk if I’ll be able to seamlessly pick back up when the rest of the book is released. I’m getting access control check errors, so I’d really like to have an actual testable page that aligns with where the book stops.

These were optimizations that I made while writing the chapters to clean things up. I pushed these to the GitHub repo which you will get access to.

How can I test the Registration/Login functionality to see if my API and frontend were done correctly up to this point? Will you be releasing chapters as they’re finished, or will they all be released together? Also… when can I expect to see them?

There are a lot more chapters coming, with a full fledged API to Frontend feature coming by the end of this week. We have a lot more to write and it takes time to clarify the information, I’m quicker at writing code than content. I’m hoping to have the entire book finished in April for release.

Let me know if you have any more questions.

Your insight is very good thanks for this reply :slightly_smiling_face: