I’ve been having a hell of time with getting a new project spun up on my local system. I’m assuming a lot of the issues are due to changes in how permissions work between Debian 9 and Debian 10, and my laziness in learning what changed. I’m not going to go into those problems here, mainly because this is still in the experimental phase and I’m not even sure this will work out. If anything, it’s just going to prove I’m a fool and need to re-evaluate how much I think I really understand. Anyways, I decided to say fuckit, I’ll setup a server specifically for the sake of developing this project. Best case, I get the damn thing off the ground. Worst case, I end up crying in a corner because this shit is too complicated for my mind.
Some background might help
Ok, full disclosure. I’m looking to build a multi-tenant app with Laravel. I’m using tenancy/multi-tenant to facilitate the tenancy portion of it. Setting this up and getting it configured is super easy. Hell, Laravel makes a lot of the crap I still do manually way easier (thanks legacy codebase and internal customers that hated my predecessors, and by proxy, still hate me). Anyways, I ran into several issues in just the first few hours of buildout. I even reported one on the issue tracker – never got a response after two months, on github, watching countless other issues get responses and even resolved. Like, am I fucking invisible or do people think I’m a bot? This seems to happen a lot. Continuing…
I got 99 problems
The first issue was one of incorrect permissions. Easy enough to solve for the sake of dev; God mode all the things!
chmod -R 777 ./*
Don’t do that, it’s really bad and only masks your issues. Seriously, fix whatever is causing the problem. Your group policies should line up to allow members of that group read and write access within the affected directory. Making everything world writeable causes a sysadmin somewhere to turn more grey every time you do that. Just don’t.
Next up, tenants were getting access denied to the database. Ok, so this took some finnagling to determine the source, but eventually I got passed that. Now this is where shit got really tricky. multi-tenant writes
nginx configurations for each tenant. It then attempts to reload the
nginx process so that the tenants can access their instance of your app at
https://tenant.yoursite.com. Easy enough, right? Wrong.
Debian 10 blocks you all over the place, and noone in the Discord nor on Github could approach the problem in any kind of helpful manner. It’s like anymore, full stack developers are Ubuntu fuckbois and terrified of anything that requires even a remote level of actual technical understanding. Not that Debian is any better, but at least it’s not Ubuntu [puke face emoji]. In fact, the dude (luceos, I think?) was downright rude in their discord. Probably was having a bad day or something. Maybe he’s just grumpy that they insist on using some bloated, JS driven pile of junk chat system vs using something, again, requiring a bit more technical knowledge like IRC. /endrant
I got 66 problems
Either way, not the greatest experience with this yet, but it still looks like the most supported option for at least getting the foundation of my app set up. Now around the time all of that bullshit was going on, the day job decided it didn’t like me having a few extra hours in my days. Here came the 60 hour weeks. That. Didn’t. Stop. Coming.
That flame? That’s my home life. Thanks, boss! I swear I’m not bitter, I’m just tired of being the only engineer supporting 5MLOC that 3k people rely on for income. So, I’m starting to squeeze in time when I can and a thought crossed my mind as a result of the SOCKS5 discovery. What if I could plug VSCode into a server using a similar technique? Then I could quit fucking up my home machine, trying to figure out these issues, I’d have a dev environment that’s consistent and accessible everywhere, and I could show the app to some key players when it gets to MVP. This idea seemed reasonable enough, I found this extension: remote-ssh.
Essentially, this confirmed my thoughts. I can plug VSCode in and not rely on vi remotely (I love vi, don’t get me wrong. I just love VSCode’s intellisense more). I can SSH in and have the session I need on the server, and I can easily replicate production with Let’s Encrypt and everything. It’s a win-win-win situation. Now the question is, will it work? I don’t know yet. I have to find time, hopefully over Christmas break, where I can actually sit down and hack on this. Another post will follow where I’m bitching about the next issue. Thanks for reading, if you even read this far.