I deployed PocketBase the WRONG WAY | Code along

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I want to set up a new pocket-based database on fly.io I've never done this before and if you've never done this before then let's do this together let's jump in first things first I have three panes open my fly dot IO account logged in I have the documentation for pocket base and then a terminal and I already installed the fly CLI some time ago so let's go to frequently asked questions the first one is do you offer hosting and they recommend fly dot IO with this example since we need to create a pocket base Docker file not exactly sure what that means yet don't really know much about Docker to be honest I've already installed fly and I have an account so I just need to log in so it says navigate to the directory where the docker file was created so I am going to copy that and just make it wherever but I didn't even know what they're called so I think we just use Docker file so touch Docker file we'll Vim that paste in what we had before and write that out let's run that fly control launch command and see what happens so it detected our Docker file I choose an app name leave blank to generate one um yep we're going to be in Los Angeles California created the app broken morning 148 and then that lives at fly.io by that same project name okay uh would you like to set up a pro postgres database now um no I think uh would you like to set up an up stash redis database now no I think okay so we wrote the config filefly.tomo uh would you like to deploy now uh I let's say no so we can run AI Control to deploy it when we're ready all right so we need to run this command here to set up that volume so you still want to use the volume yes Los Angeles okay now I'm going to open this fly dot toml file grab this and put it in there okay it says it should look something like this I assume that it does that one simple check yeah no it doesn't look anything like that actually let's try and go with what we have generated for us and see how it goes final step deploy so Run Fly control deploy now this is doing its thing so I thought I'd note that it's pretty cool that you can run some backups so it'll hold a five-day backup and then we can uh run these commands to pull those backups speaking of backups let's talk about my reasoning for choosing pocket base I have some very small needs for my personal site where I want to have a database where I can post some basically streaks like how well I'm doing eating or tracking my weight and all that kind of stuff I like pocket base because it uses SQL light sqlite is an embeddable embeddable database and so it's basically just a single executable and then alongside of it there's a file with all of the data in there so it's really cool it's just these two files the cool thing about pocket base is that it actually has this full UI layer on top of it now I could use something like Firebase or super bass or like whatever but I don't really like being locked into someone else's service theoretically I could just take this pocket base and the data and just move it anywhere else so that's why I landed on it for my personal needs okay let's see if it's done okay so I made a big mistake and I set this up in my user directory which is um the why it was taking so long it shouldn't have been uploading all of the stuff in my user history uh to the cloud let's make a new directory in the code directory uh calltran.dev move in our fly dot IO file and the same thing for our Docker file uh code chand.dev as well let's go there and see what happens okay now I'm going to run fly control again and see if I can deploy it from this directory okay so this makes a lot more sense when it's build sending the build context that's just 413 bytes as opposed to the like gigabyte or so that I had started to send before canceling it it says we can watch at this URL I'll copy that and it finish the deploy so let's check out that URL first this is the monitoring URL um this is saying the name is floral Sunset but let's check out the application URL okay code 404 message not found overview let's jump back to pocket based instructions so let's go to documentation here uh got everything going so this is going to serve static content of which we have none so let's try checking out the admin URL go to our site that is empty I'm gonna go to our admin URL oh my gosh and there we go so I'll create an admin user right now and here we are we have our pocket base fully set up in the cloud ready to do whatever we need to with it so that's it apart from my basic basic mistake which I hope helped you uh this was pretty easy I was feeling kind of worried about setting this up and uh you know us doing it together man it's super simple so if you have things that you may be afraid of setting up for the first time that you think would be fun to do with me let me know and uh maybe I'll make a video on it until then I got plenty of other videos right here that you may find interesting I hope to see you around and see you again soon bye [Music]
Info
Channel: chantastic
Views: 10,432
Rating: undefined out of 5
Keywords: react, reactjs, javascript, web development, programming, code
Id: u63pOK6Zyog
Channel Id: undefined
Length: 5min 34sec (334 seconds)
Published: Wed Jun 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.