All Episodes

August 8, 2024 โ€ข 40 mins

In this episode, Jake and Michael discuss different approaches to configuring a Laravel app, for consistency, security, and shareability among a team and across environments.

Show links

Mark as Played
Transcript

Episode Transcript

Available transcripts are automatically generated. Complete accuracy is not guaranteed.
Michael (00:00):
Go go. This is Michael Dyrynda.

Jake (00:02):
And this is Jake. Oh, hold on. And this is Jake Bennett.

Michael (00:06):
And welcome to episode 160 of the North Meet South Web
Podcast.

Jake (00:12):
I have to get paper towel because I just literally spilled
bubbly tint on my laptop.

Michael (00:16):
I did the same thing. I picked up my my water vessel,
and, I realized that I forgot toput something in the dishwasher
that I had just turned on. So Iput it down, and water just
splooshed everywhere. Sofortunately, it was on the desk
out on the on the dining table,so I can deal with that later.

Jake (00:35):
Well, hopefully, this doesn't impair the ability of my
laptop to do what it needs to doand hopefully these random key
presses I'm making are notstopping the recording or
anything insane.

Michael (00:44):
I think I think we're okay. I think we're okay.

Jake (00:47):
Yep. You just needed to have a captain cook at your
microphone there.

Michael (00:51):
A captain cook.

Jake (00:54):
In Aussie slang, that means have a look or brief
inspection apparently.

Michael (01:01):
I listened I listened to the latest It's a

Jake (01:03):
good thing I'm a true blue.

Michael (01:05):
Oh, true blue. Loyal friend. Yeah. That's right. I, I
was listening to the latestBusiness of Laravel podcast, and
friend of the show, GregSkirmen, was on with Matt Scarpa
this episode Of course.
And and they ended up talking abit about Aussie slang, and and,
Matt had mentioned that on thein the Aragon AU speaker chat,

(01:27):
you know, it it doesn't occur tous as Aussies that people
observing from outside ofAustralia don't understand some
of the lingo and and Mhmm.

Jake (01:37):
And

Michael (01:37):
vice versa. So yeah.

Jake (01:39):
Yeah. People have heard the story, I think, of the time
that I was, like, on we were wewere chatting and you had to go
get a delivery at the door.Mhmm. And I I was still in your
ear because I could hear theAirPods. You were, like, hooked
up on AirPods, and I was in onan Aussie to Aussie
conversation, and it was adifferent type of language than

(01:59):
you you you and I have everspoken.

Michael (02:02):
Yes.

Jake (02:02):
Didn't understand most of it and, that was

Michael (02:05):
You could certainly be left behind. I'm I'm gonna I'll
send you this, is it this videothat I just saw the other day?
No. Not this one. I there was avideo that, Marty Friedel, I
think, shared with the with thechat talking about oh, no.
Sorry. It was Simon. It wasSimon Vashlow that shared a I'll

(02:27):
have to put the a link to thisin the in the show notes if I
can find the original video, butit was basically one side of a
conversation, like a phoneconversation between 2 Aussies
and 2 Aussie men specifically.It's, it's a good one. It's a
lot of yeah, yeah, nah, nah, oh,yeah, yeah, nah, alright, yeah,
okay, yeah, yeah, Nah.
Yeah. Of course. Very

Jake (02:50):
Alright. So I'm gonna I'm gonna quiz you on some
Australian slang here.

Michael (02:54):
Okay? Here we go. So you can tell me you can tell me
what

Jake (02:56):
the meaning is. Carrying on like a pork chop means what?

Michael (03:01):
Means, like, you know, just being crazy, doing all
kinds of weird things, justacting

Jake (03:07):
Acting unreasonable. I'll I'll count that. Yep. A grommet.

Michael (03:12):
A grommet?

Jake (03:13):
No. Grommet. No. It says says a young surfer is a
grommet.

Michael (03:18):
A young surfer. Okay. Well, I never Okay. Never got
into surfing culture, so thatmakes sense, though. Alright.

Jake (03:25):
Whoop whoop. Like, I'm driving in the whoop whoop.

Michael (03:27):
You you're driving into whoop whoop. It's, going into
the middle of nowhere. Yeah.

Jake (03:32):
Okay. Whoop whoop, not whoop whoop, whoop whoop.

Michael (03:34):
Not whoop whoop. No. Whoop whoop in the middle of
nowhere.

Jake (03:38):
How did that one come about? What's whoop whoop? What
is that? Is it just don't know?

Michael (03:42):
It's usually like dingo usually dingo whoop whoop, and I
don't know why dingo, but it'slike, it just just means it's a
far distance from anything. Theetymology is said to have been
derived from the nickname givento men who carried fleeces in
shearing sheds after the soundthey made as they ran around.

Jake (04:03):
Whoop whoop.

Michael (04:04):
There it is.

Jake (04:05):
Okay. Mates rate.

Michael (04:07):
Mates rate? It's, you know, you look after your mates,
you give them a a good deal.Good good price.

Jake (04:12):
Good discount. A friend's discount. Okay. Have a captain
cook.

Michael (04:15):
Have a captain cook? Which you you got me Yeah.

Jake (04:18):
Do you know

Michael (04:19):
this one? Haven't I'd I

Jake (04:22):
It says have a look or brief inspections to have a

Michael (04:24):
To have a look around, like, contextually, yeah, I I
get it. I, like, I feel likeit's something that maybe I've
heard once or twice, but it'sit's not common. And so, you
know, it's not not commonvernacular for for men's.

Jake (04:37):
I've got I've got 2 2 left for you. A 2 pot screamer.

Michael (04:43):
Two pot screamer?

Jake (04:45):
A 2 pot screamer. That guy's a 2 pot screamer. Nah.
Someone who can't hold theirliquor.

Michael (04:52):
Someone who can't. We've,

Jake (04:57):
yeah. I was curious about that if you had actually

Michael (04:59):
heard that before. I've never heard Tubot Screamer.
Cadbury is one that we've we'veCadbury? That I use often. Is
your someone's a Cadbury,they're a glass and a half.

Jake (05:08):
Oh, okay. Okay.

Michael (05:10):
It takes them a glass and a half to get drunk.

Jake (05:12):
Okay.

Michael (05:13):
And there's another one that I can't it's on the I can't
can't can't can't grasp it, butthere is another one.

Jake (05:19):
Alright. I remember you telling me Whispers. Whispers is
a good one.

Michael (05:22):
Whispers. That's right.

Jake (05:23):
The guy who never saw it. If you shout, it's like if you
shout that's like you're gettingyou're picking up the the round
of drinks.

Michael (05:29):
Tap the wrap. Yep.

Jake (05:30):
And the guy and the guy who never does that is called
whispers. So that's That

Michael (05:33):
whispers never shouts. That's right.

Jake (05:34):
Whisper never shouts. Okay. Last one is have a roux
loose in the top paddock.

Michael (05:39):
Have a roux, like, being, like, 10ยข short of the
dollar. Being a bit

Jake (05:42):
Yeah. Exactly.

Michael (05:43):
Not not not smart.

Jake (05:45):
Not the sharpest tool in the shed. Yeah. Not the,
brightest crown on the box.

Michael (05:49):
The brightest crown. That's right.

Jake (05:50):
Yep. Yep. I've been using, I've been so speaking of my dog,
I've been saying he's dumb as abox of rocks. I like that one.

Michael (05:57):
Dumb as a box of rocks.

Jake (05:58):
Yeah. Dumb as a box of rocks. Hot dog. Dumb as a box of
rocks. He's been I don't know.
I don't really wanna talk aboutit. It's not appropriate to talk
about on this show. By the way,did I tell you we have chickens
now? We got chickens.

Michael (06:09):
I feel like we've had this. Yeah. I think

Jake (06:11):
We we have 4 chickens now, and my son wants to get chicken
collars so we can take them tosoccer games here when the
soccer season starts. Yep. Walkthe chickens. Chicken leashes.
It's ridiculous.

Michael (06:22):
Are they hens? You get an eggs out of them or what?

Jake (06:25):
Yes. You can yes. They you can only get hens here in town.
And so, yeah, we had to gethens, but, yeah, they're they're
good. They're fun.
They're really funny, actually.You let them out and they just
kinda roam around the yard andRoam around? Yep. It's it's
funny to watch them. They alwaysstay together.
There's there's 4 of them andthey just kinda always hang out
together and they're scratchingand packing at the ground and

(06:45):
stuff. It's funny. Nice. Anyway,nothing to do with anything
except for hey, what I will sayis I think you and I beat Aaron
to the whole popping off thing.You know, we've been talking

Michael (06:54):
about We had 5 bad ways. Yeah.

Jake (06:56):
Oh, man. Well, at least. Remember when we used to do spin
drift? Every use we used to spindrift all the time?

Michael (07:00):
That's right. We tried to

Jake (07:02):
Not that it's a competition, Aaron, because it
definitely is not. Yeah. I didtry and get a sponsor of
Spindrift back in the day.

Michael (07:07):
Don't

Jake (07:07):
He started with the best.

Michael (07:08):
Bathe with Aaron.

Jake (07:10):
No. No. No. Aaron started with the best. I gotta say that.
That lemon Spindrift is quitedelicious, although I prefer the
grapefruit. He did say he wouldreview that later. I gotta say
that this one though, this one'sthe best one I've had in a
while. Bubbler?

Michael (07:22):
Bubbler.

Jake (07:23):
Yeah. It's pretty good actually. This is triple berry
breezer bubbler. Pretty good.

Michael (07:27):
Alright. I I did actually have a mineral water
earlier. It's made with wonkyfruit, and if I can find Dash
Water is is the name

Jake (07:37):
of it.

Michael (07:37):
So they make it with wonky fruit, which is, you know,
like, you go to the supermarketand you and you buy fruit, or
you go to the greengrocer andyou buy fruit. And it's like,
the good stuff goes therebecause it looks good. But what
do they do with the wonky fruit?The wonky fruit, you know,
usually gets sold off or goes toa farmers market Gotcha.

Jake (07:54):
Yeah. Yeah.

Michael (07:54):
Or in in the instance of, dash water, they they make
wonky fruit. They use the wonkyfruit to to make their mineral
water. So I had, I don't knowwhat it was. It was a raspberry?
Raspberry is one.
Yes. Sparkling water infusedwith wonky was raspberries. Very
nice. Okay. It's it it'sdefinitely definitely more than

(08:17):
a a passing I don't remember theexact phrasing Aaron used, but,
like, you know, it looks like,it's like someone shouted the
the name of the fruit from theother room is the only
connection

Jake (08:26):
that we've

Michael (08:26):
ever get. So

Jake (08:27):
Okay.

Michael (08:28):
Yeah. This this one was okay.

Jake (08:30):
I like it. Hey, dude. I got a couple topics to talk
about today, but I've got onethat I think would be a fun one
to start with. And maybe we canjust keep this episode focused
on 1. I don't know.
Maybe. We've tried. I've got aninteresting thing to we've kind
of come to a conclusion, but wehaven't standardized it across
our code base. Actually, I'vegot 2 things that we could talk
about. Let's talk about the 1,and then if we have You

Michael (08:51):
wanna you wanna stay on track and in thinking about the
first topic, you've alreadythought of the second one.

Jake (08:57):
Yep. Well, I know what it is. I know what the okay.

Michael (08:59):
So here it

Jake (08:59):
is. Okay. Here's the first one. We're talking about running
your tests in some sort ofcontinuous integration system.
So for us, we use GitHub actionsto run our tests.
Right? So that typically is inyour dot GitHub directory, and
inside of there you'll have somesort of YAML file. Maybe we call
it tests dot YAML. Inside ofthere, you're going to set up

(09:22):
your container that's going topull down, MySQL. It's going to
pull down PHP, and, it's gonnago through the process of
setting that up, and then you'regoing to it's going to pull
down, you know, all yourdependencies.
It's going to then then the realfun starts. Okay? So now you've
got your Laravel. Your Laravelstuff is downloaded and your

(09:48):
composer installed. So now weget into the the meaty bit, and
here's here's where it is.
What do you do with ENVs? Nowthere's about 3 different places
you could place these ENVs. Andso the question for me is where
do you place each and what isyour your heuristic for
determining what goes where. Solet me give you some options for

(10:10):
where you can put e and vvalues. You can put them
straight in your YAML file.
So in your test dot YAML, youcan actually define for each of
the different actions thatyou're going to run. You can say
env, and you can define straightin there an env value that will
get picked up by your Laravelapplication or that will get
picked up by, you know, somecommand that's gonna run. It

(10:33):
doesn't necessarily have to beLaravel. It could be like you're
migrating. I guess, in thatcase, you would be migrating
your database.
It could be that sort of stuff.Right? You could set those ENVs
directly on that. You could alsoput them in like a
dotenv.example file that youcopy over or a dotenv.ci file
that you copy over out of yourthing. You can copy that to the
ENV Or in the case of PHPUnit,you have something specialized

(10:56):
for that like PHPUnit dot XML,which you can also override by
the way with ENVs that you setspecifically on that PHPUnit
actions.
There's a lot of stuff going onhere. What is the methodology
for setting ENVs? Where do youput what? That's the question.
So I'm gonna I'm gonna I'm gonnaclarify one more time.

(11:18):
Here are the 3 options that youhave, and I will I'm I'm even
sort of I feel like giving you alittle bit of a leg up because
these are the places I've I'vedecided to put them. GitHub
actions has a place where youcan put secrets in a repo. Mhmm.
Let's narrow it down to adotenv.ci file. We can talk
about why that would be later,but dotenv.ci and PHPUnit.XML.
Okay. Those are the options. Letme hear your thoughts.

Michael (11:41):
Alright. So it may or may not shock you to know that
we actually use all of them.

Jake (11:48):
We do too. No. We do too.

Michael (11:50):
In different situations. Mhmm. Mhmm. So the
PHP unit dot

Jake (11:56):
XML file.

Michael (11:57):
It is. Yeah. Yeah. The, the PHP unit dot XML file, we
will use for things that we wantto be the same irrespective of
which environment we're runningin. So if we're running in CI or
if we're running it locally orif we're running it, you know,
on another machine, these arethe things that we don't want to

(12:19):
change.
Things like And you put that in

Jake (12:20):
which file?

Michael (12:22):
Into the PHPUnit.xml. Ml.

Jake (12:23):
Okay. PHPUnit.xml. I'm just gonna write this down for
myself because I'm interestedhere. PHPUnit.xml.

Michael (12:29):
Yep. So these are specific values that we don't
want to change where they'rerunning. Things like bcrypt
rounds, log channel, cachedriver, qknet, like, that kind
of stuff that we want to alwaysbe the same everywhere. That
goes in the PHPUnit. XML.
Into our GitHub YAML file, intoour pull request. Yaml, we will

(12:53):
then put all of the secrets thatneed to change and we only put
the secret things in there, andthen we reference them from
GitHub actions secrets. So, youknow, dollar paren paren or
brackets brackets no, bracebrace, secrets dot and whatever
and so we map those 1 to 1.There are some things in there
that we hard code, things thatare, not secret as such like

(13:18):
URLs to, you know, UAT orstaging or testing environments
for third party testing, thingslike that that don't change, or
they just need to have somespecific value. And then we
actually have a third value orthird type which is kind of like

(13:39):
the .env.ci but we use this forour review environments.
So we will, when a pull requestis opened and we add a review
tag to it, we have a GitHubAction that runs through and
spins up a pod in Kubernetes. Sowe get like branch name dot

(14:00):
review environment whatever. Andthen what we do in that is we
reference 1Password URLs in ourdotenv. Review. And so we will
just run that through1Password's hydrate or fill or
whatever whatever the command isand it will find the
corresponding keys and injectthat into there, and then we use
that in our review environments.

(14:21):
So yeah, all 3 of them. .Env.Example we will put some things,
you just have to be verycautious about what you're
putting in there becauseobviously .env. Example is
typically committed to your gitrepository and so whatever you
put in there is going to be inyour git history forever. So you

(14:43):
have to be careful that you likedidn't put the secret in the
wrong file or whatever elsebecause you don't have to then
roll those things, thosecredentials, if if they do end
up in GitHub for whateverreason.

Jake (14:55):
Yep.

Michael (14:57):
And then developers also have like, for testing, you
can have a dotenv dot testing onyour local machine, and then
Laravel will handle swappingthat in when you run PHP artisan
test or whatever. Laravel willalways look for a dotenv file
that matches whatever yourconfigured app_env is in the

(15:20):
environment, and it will try andfind find a corresponding dotenv
dot environment name. And thenthis is for, like, your machine
specific things. Like, you mighthave a different username and
password for the database or youmight have, you know, whatever
configured there. You might haveyour own set of testing
credentials for API endpointsand things like that, where

(15:42):
where you want to know, be ableto run those things locally.
So that will then use and thatwill then build off your, you
know, your localdotenv.env.testing will override
those values in a test testsituation.

Jake (15:54):
Is that is that how it works? Is that it's like if you
have dotenv.testing, does thatoverride your doten, like, your
local dotenv? Is that what itis? So, like, you will use your
dot is it? Okay.

Michael (16:06):
Because we only say I only say in the dotenv dot
testing the things that I know Ineed to change in my
environment. I'm pretty sure Ineed

Jake (16:16):
to look that up. Only override dotenvvalues. That's
not I'm curious about thatactually. I don't know that to
be true, but I am curious

Michael (16:26):
about that. I could be wrong, but I'm that's how I've
got

Jake (16:28):
it set up. So Yeah. Yeah. No. That's that's good.
So, man, there's just a lot ofdifferent sort of so here's the
situation. Right? I'm trying toteach the new developer today, a
junior developer who'sstruggling with, like, hey.
These tests aren't passing. Sowhy aren't they passing?

(16:49):
Well, because the database can'tget set up in CI. Like, the
migrations won't run, and thenwith my if I can get the
migrations to run, then thetests fail because they're
looking for a differentdatabase, and it's like, okay.
Well, where do we set thatstuff? Right? So I'm trying to
sort of standardize thosethings.
And so the conclusion that I hadpreviously come to maybe I can
sort of share with you. Right?So if we're talking about

(17:14):
layers, I suppose, Anything thatyour Docker container or
anything that your GitHub actionwould need to know about that is
outside of the scope of yourLaravel project needs to be
inside of the tests dot yaml orthat GitHub YAML file. Has to
be. Now if it's in there andit's never gonna change and it's

(17:34):
not a secret, I'm okay with itbeing hard coded for the most
part, mostly.
Mhmm. If it is a secret, it mustreference a GitHub action
secret. Okay. So there's top,top level. If there is a value
that needs to be outside of thescope of your Laravel
application, then it needs to bein that YAML file.
Okay. So typically how we setthat up is at the very top,

(17:56):
we're gonna be setting up ourcontainer, we're gonna be
setting up MySQL. We're going tobe, you know, naming whatever
that database is going to be.And so that's gonna be something
we're gonna put in that YAMLfile. That's where we're gonna
set sort of that some some ofthat environment.
The next step that we typicallydo is we're typically go
typically going to copy oversome e n v. You you can either

(18:20):
just like dot you can eithertouch dotenv or something like
that, but then you don't haveany keys. So you kinda need to
copy over something because theone thing that's pretty critical
if you're gonna be testing isyou have to generate a key for
your application. Yeah. Right?
You have to do PHP artisan keygenerate. So you have to have
something there that's waitingfor your app key. You're also
gonna need something like yourapp URL. That's gonna be pretty
critical that you have that. Soyou need to have like some

(18:43):
semblance of a ENV that's set upthat you can then fill in with a
app key, but also that probablyhas some default values that
look like they make sense foryour CI environment.
So what we've decided to do issay dotenvci sorry dotenv.ci
should include all the baseenvironment variables needed for
Laravel, right? Again, this isLaravel specific, so now we're

(19:06):
into the application Laravelspecific in order for the app to
run-in the GitHub actioncontainer. So that's what lives
in there. So that's gonna bethings like the database
connection. That's gonna bethings like the database name,
the database user, the databasepassword, the database port, if
that's needed, that sort ofstuff.
And there might be some of thosethat are shared between the test

(19:28):
dot yaml and that dotenv.ci.Right? You might have to have
like for us, I know that when weuse, our our test database name
is typically like MySQLunderscore testing is what we
use. Right? Now I wanna make adistinction between this because
dotenv.ci is what we would usein CI, but it might not
necessarily be what you woulduse as a local developer for

(19:49):
your own local testing stuff.
So we sort of allow you todecide that on your side, if
you'd like to, but env.ci iswhere we typically set up that
stuff for the, CI environment,and it's going to be in sync
with kind of what we wouldexpect to be in our test dot
yaml stuff. Then lastly, we haveour p, sorry. Yes. Let me just

(20:16):
say that right. I think I mighthave said some of that
backwards.
Okay. Let me let me run thatback real quick. Did I say did I
say our test dot yammer first?Is Is that what I said first? I
think that's what I said first.
Okay. So then last, you havePHPUnit.XML. So this is anything
that is just the overrides forrunning the tests, like our
PHPUnit tests. Mhmm. Right?
So, this would be typicallyshared between, honestly,

(20:41):
probably your your obviously,when you're running tests
locally, it's gonna use PHPUnitdot XML, and when you're running
tests in CI, it's gonna usePHPUnit XML. So like what you
said, those things that will notchange across any of the
environments that just need tobe set up, right, those bcrypt
rounds, you know, some of thelike the cache driver is gonna
be array. The database or thequeue driver is probably gonna

(21:03):
be sync. The mail driver isprobably gonna be array or log.
Right?
Those sorts of things. Those arewhat we would set up in our
PHPUnitDocsML. So I've got itall written up for our
developers to say, like, hey.Here's here's kind of how it
should work and here's anexample of each, but it's still
a bit tricky. Right?

(21:23):
And so we're sort of on thispath to try and standardize this
across the different thedifferent repositories, but it's
just difficult. It's difficultto make it happen. There's just
a lot of, you know, that YAMLfile is so large so many times,

(21:43):
and it's hard to just keep thosethings all in sync. And so we're
trying to just standardize thatand give at least new people an
idea of, like, here are theplaces you could put this and
here's generally where, youknow, what each one of these is
responsible for. Mhmm.
If there's anybody else outthere who has come up with a
better solution for this or abetter sort of heuristic and,
like, hey, here's where each oneof them go, I'd be happy to hear

(22:05):
it, but that's kind of wherewe're at at this point. I like
the idea of the 1 passwordstuff. For your 1 password
stuff, are those those 1password, environment variables
also used for your developers intheir local development
environment?

Michael (22:19):
We're we're not, but they can be. So the way that
that works is you can likeinject an environment kind of
thing. So you can say inject devor whatever which references a
vault in 1 password. Sure. Andthen you give developers access
to that specific vault, and thenthey can just use like opcolon/

(22:41):
local dev/ whatever the the thenitem is, and then you Now is
that

Jake (22:47):
does that actually go in your dotenv? Is that what it's
like a URL that goes in there?In your dotenv file?
Interesting.

Michael (22:52):
Yeah. So that way you can you so essentially, you just
put all of those all of thosethings into the 1Password file,
into the dotenv file, and youcommit all of that directly in
there. And so when you hydrateit, there's the the one password
CLI. You pass it, like, the nameof what that vault is. And so

(23:14):
you authenticate using all ofthe the 1Password stuff.
And then when you spin up yourlocal environment for your app,
you can just run o p whatever itis, local dev, and then it will
pull all those values out. It'll

Jake (23:29):
Like prompt for

Michael (23:30):
the password

Jake (23:30):
or something to

Michael (23:31):
say, like,

Jake (23:31):
I'm gonna

Michael (23:32):
Yeah. But it will replace them in that file, and
then you write that the outputof that file to your dotenv dot
local. So be dot So the dotenvdot whatever file So basically
you just commit .env.op, forexample, into into your git

(23:56):
repository. And that has all theopcolon /URL references in
there.

Jake (24:01):
Mhmm.

Michael (24:02):
And so that just goes into ci. And that way, you blow
away dotenv, you blow awaydotenv.ci.env.testing, whatever.
And then you give all of thesethings access to the one like,
the relevant one password vault.And that way you can just spin
it up. So you do, like, opwhatever, and then you can give
it a target, like an output, andit would just put it into

(24:22):
dot.env, for example, and thenit will have all of those values
swapped out for whatever theyactually are.
So no one actually needs toknow.

Jake (24:30):
That you're running.

Michael (24:31):
Yeah. Based on the environment which corresponds to
the to the vault that thosecredentials are then stored in
inside of 1 password.

Jake (24:38):
Well, that's really freaking cool. And so in your
continuous integrationdevelopment or environment, it
does the same thing. It runsthat CLI script and then it does
it replaces those and thenwrites that output file.

Michael (24:49):
In CI, we don't. Just because we don't expose those
things into, into GitHubactions. So those things just
use GitHub secrets. But inorder, like our production
environment, our stagingenvironment, our QA environment,
our like, our ephemeral reviewenvironments, they're all hooked
up. And so they're all they'reall done that way.

(25:11):
And that way also with, like,our Kubernetes, like, in
production, we can go into 1password if we need to update an
ENV file. And we've got, like, awatcher in there that basically
goes, every 2 minutes, hasanything changed? If it does, it
will repopulate the ENV file orthe environment, and it will
then, restart the the containersso that it picks up the new

(25:31):
environment.

Jake (25:33):
That's interesting. We I will say I have benefited
greatly from being able to havecached EMV values that don't
change unless I redeploy. Sosometimes I'll know a PR is
coming and I'll have new ENVvalues that I know are gonna
have to go in that maybe aren'teven replacing old ones or
sometime I mean, sometimes it'sreplacing old ones, or updating

(25:55):
them. And I know I can change itwith, like, a total impunity
until it gets deployed again,and it doesn't matter at all
because the values are cached.And so it doesn't make any
difference.
And I have to be the one tomanually tell it, nope.
Redeploy. Clear the cache. Clearthe clear the configs, and it
will then, you know, only atthat point will it re, decide
what those values are. So

Michael (26:15):
anyway, that's interesting. Like that. We used
to do it like that, but ourdeploy process is pretty heavy,
and it takes 10, 15 minutes. Soif you need to change an
environment variable, like, youwanna be able to do that fairly
quickly. If you wanna toggle thefeature off or or something,
like, you wanna, you know, flickthe kill switch, then you wanna

(26:35):
be able to do that basicallyinstantaneously.
So 2 minutes is better than10:15.

Jake (26:39):
Yeah. I I agree with that. My my question on that is when
it runs that, it replaces yourdotenv values and then does it
run the cache, you know, configcache again or does it clear the
cache and re recache it?

Michael (26:52):
Yeah. And then do you have

Jake (26:53):
to do, like, a f p m restart in order to do that, or
you're saying it

Michael (26:55):
just I don't know. We I we delegated all of the
Kubernetes set up to Stewart. So

Jake (27:03):
Alright, Stewart.

Michael (27:03):
I just You need a lot of stuff. I just got I just got
told that, if I need to updatean ENV value, I can I can just
change it in one password andwait a couple of minutes?

Jake (27:12):
That's really nice. I I will say, like, I was I've had I
feel like I used to be able todo that, but I can't do it
anymore. Like, I couldn't dothat anymore. So anytime I
change a ENV value, even if Irecash the config, it doesn't
matter. It's like my my frontend my actual application
doesn't react to it unless Irestart FPM.
Once I restart fpm then it willwork. But restarting fpm Right.

(27:34):
Because you're probably usinglike drops all the open yeah. It
drops all the open connectionsand stuff which sucks.

Michael (27:39):
You're probably using, opcache, I would assume in
production. And if you're usingopcache, then it will hold on to
all of that stuff until youreload

Jake (27:48):
That makes sense.

Michael (27:48):
Fpm. Yeah.

Jake (27:50):
Yeah. That makes sense. The benefits of the downfalls of
our

Michael (27:54):
cache because it will it'll do the config cache, but
until you then restart f m, itwill pick up those changes.

Jake (28:00):
Yeah. I've thrown a recipe together in Forge that I can
just say, like, run this forthis particular site, and it'll
just do it. It'll recache theconfig, and then it will, you
know, restart FPM for thatparticular site, and then we
should then we're good. ButYeah. It's just, you know, it's
what we have to do.
We can't just change

Michael (28:18):
the e n d. We have

Jake (28:19):
to do that.

Michael (28:20):
So so many different ways. You know, obviously, 4 gs
is really good in providing areally quick and easy one click
for the most part way to get upand running for a lot of Laravel
applications. But as you startto scale, or you have more
things, or you need to considermore intricacies of your own

(28:43):
applications, it can then meanthat okay maybe Forge isn't the
tool for you. And like Forgewill take you a long way in in a
lot of situations, and for a lotof people you know a load
balancing in front of 1 or 2nodes and just scaling
horizontally that way is spinthem up and tear them down and
and have reproducibleenvironments for, spin them up

(29:06):
and tear them down and and havereproducible environments for
our other, you know, other partsof the business being able to
have an environment that theycould test against. It was just
easier to put all of this stuffinto Kubernetes and then deploy
it running on, EKS and thingslike that.
So it's all all controlled. Andthen all of the platform itself
is managed by the Stewart.Operator. Yeah. No.

(29:29):
Not even like Stewart. We so we,my team, is responsible for the
application and how that'sdeployed and all of that, but we
have an, like, an infrastructureor a systems team that is
responsible for the actual, EKSenvironment. And so they keep
all of the security stuff up todate for us. We just deploy to

(29:50):
the environment, and and it'sall nicely separated out and
and, you know, compliantcompliance is a big piece as
well. So

Jake (29:59):
Yeah. I gotta look to see we use, we use something other
than 1Password, but I feel likewhen we were first signing on to
this, there was this idea of,you know, a CLI tool that would
allow you to pull that stufffrom there. But I don't know if
it's quite as good as 1Password's, integration. I know
we had talked about using thatat one point, but never never

(30:19):
fully made it there. It's one ofthose things where it's like,
you know, it's hard to find thetime to slow down and stop
working on features to work onsome of this infrastructure
stuff.
Yeah.

Michael (30:27):
I feel

Jake (30:27):
like we're getting there though to the point where it's,
like, okay. I really need tohave somebody take the time to
do this because the developerexperience is really important
on these things. Like, there'sone application in specific, you
know exactly which one I'mtalking about, that's really
freaking hard to get set upcorrectly. The ENV is just it's
a beast. Right?
And it's, some of the thingsthat are up there don't don't

(30:48):
have, like, great testingenvironments. Like, there are no
free sandboxes for it. Like, wedon't typically get to use
services that are like Stripe.You know what I mean? We have,
you know, some crusty XML thingthat we have to use.
And it's like if we're usingYeah. You know, Twilio even
doesn't necessarily have a greatsandbox stuff. I mean, like,
sort of does, but not totally.It's not like a

Michael (31:10):
Yeah.

Jake (31:11):
I don't know.

Michael (31:12):
There's there's some stuff. Sending an SMS or making
a phone call.

Jake (31:16):
Correct. Correct. Yeah. Exactly. You just kinda have to
actually do it.
And so, you know, it's it's I'mhesitant to give that stuff to
people who aren't me because notthat I'm the only one who can't
make a mistake, I certainly havemade my share. I just don't ever
want somebody else to beresponsible for me giving them
something and then screwing itup because it's, like, that's my
fault. Like Yeah. So anyway, asa result, I'll just don't give

(31:36):
it to him, but then that

Michael (31:37):
makes it so important. The the tricky thing as well.
Right? If you've, like, you setthis environment up on your
machine 5 years ago or whatever.And, you know, you it it works
and you've, like, added stuff toit and whatever.
And it's you don't often go backto the very beginning and
recreate those things, and soyou don't hit the pain points of
someone who is new to theproject. Like, when I, you know,

(32:00):
when I did some contract workfor you a couple of years ago,
it was like, okay. How do Iactually get this up and
running? All this stuff is here,but it's, like, incomplete or
it's missing something orwhatever else. So, you know,
it's it's unfortunately, oftenfalls on the lap of the new
person to, you know, fix thosethings up and get it into a

(32:22):
state where

Jake (32:23):
Yeah. It

Michael (32:23):
can be done. And that's like when Stewart came on, his
first job was to containerizethe application and get that all
all moved across. And so, youknow, that's that's what he did.
And that's why, you know, wewere in a position to have that
all set up now as we had someonethat knew what they were doing
that got it all up and running.And so now

Jake (32:40):
That pod and Kubernetes, you know, it's just set. Right?
It's just like you don't have todo

Michael (32:43):
it again. But, you know, it was like a 4 or 5 month
project to go from, like,nothing to, okay, let's get our
staging environment over there.Let's get a QA environment over
there. Let's work on theseephemeral review environments,
let's cut one tenant across tothis in production and just keep
an eye on it to make sureeverything's behaving. So it did

(33:05):
afford us the ability to get onPHP 8.3, like we had an 8.3
container running in productionfor a few weeks after having
staging environment running onPHP 8.3 for, you know, a month
or 2 before that.
So that when we actuallydecided, okay, we're gonna
update all of the dependencies,we're gonna set a minimum PHP of

(33:27):
8.3, we're gonna, you know, shipthat all to production, we knew
fairly reliably the applicationwas going to continue working
because we had been running allof this stuff in PHP 8.3 for 2,
3 months beforehand, which whichwas really handy as well. So

Jake (33:43):
Absolutely. That's pretty cool. Yeah. So that's something
we're working on. The next timethat we're together, maybe we
can talk about oh, boy.
Now I'm gonna forget what itwas.

Michael (34:01):
It's gone.

Jake (34:01):
Nope. Lost it. It's gone. Yeah. I will come back.
I will I will remember it nexttime, but, yeah. There was the e
and v's and then, totallyforgot. Lost it. It'll come back
to me later. I'm positive.

Michael (34:13):
Too much good too much good chat about,

Jake (34:15):
the base. Yeah. Too much of that good stuff. So anyway, I
I feel like I'm not evennecessarily closer to a solution
than what it was when we firststarted. I've discussed it.
Like, I've got it written up ina wiki, so that they kinda have
an idea. But the interestingthing to me is that
dotenv.local. So do you guyslike, do you ever even have a
dotenv setup? Or do you whenyou're on your local machine,

(34:37):
like, working your your localdevelopment environment, do you
ever do you just do dotenv dotlocal?

Michael (34:42):
On my local the same. My local machine, I think I've
just got it dotenv. Yeah. Yeah.

Jake (34:46):
Just dot dotenv.notd.env.local.

Michael (34:49):
Yep.

Jake (34:49):
But the dotenv.local is what's written

Michael (34:51):
on my local machine. Have a dotenv. Yeah.

Jake (34:54):
Okay. But, like, when one password runs, does it copy all
the secrets to a dotenv dotlocal? Or just do your dotenv?

Michael (35:01):
The intent. Yeah. That's the intent. Is that your
dot in, well, yeah. So we'renot.
So I said we can do that. We'renot at the moment. So we've got
a dotne.review, which in ourreview environments gets,
populated and then and created.Locally, we're still Wild West.
It's, you know, oh, I need towork with this new thing.

(35:23):
It's not working. Oh, I need togo and find out where the
credentials are for this thing.You know, it's Okay. Good.
Especially as the as the teamgrows, you know, and one person
works on some integration andthey've got the keys that they
developed with this third partyservice.
And it's like, okay. This nowgoes into CI. But the next
person that pulls down theproject, they're like, well, I
don't have these environmentvariables, and this part of

(35:43):
application doesn't work. So youknow, as as you get into a
bigger team, you've got tofigure out how to share those
credentials. So yeah, 1 passwordis certainly the way.
We haven't gone, as I said, allthe way to doing that for all
the environments, but it is itis how it would be done using
that that same concept. And thenI think 1Password put out a a

(36:04):
blog, you know, I think we'vetalked about this before, like,
a year ago or a year and a halfago, where it says, you know,
remove remove your secret storedotenv in, in git. And and
that's how you would do it. Youwould reference all of these
vaults and the items and theirkeys in the e n f e file, and
then there's there's never aconcern that you're gonna, you

(36:24):
know, commit a secret becausethe secret just doesn't exist in
those files anymore. Becausethat's you know, that then
becomes the policy of of theteam.
We only ever put a reference tosomething in there. We never put
an actual value in there. So

Jake (36:40):
If you wanted to get a sponsorship for Laracon
Australia, you should do alittle article or a little video
on how to set up 1 password withyour GitHub stuff, and then you
just reset 1 password. Or talkto Jeffrey Way. Be like, hey.
There's a lot of pain when we'retalking about managing ENVs. How
do you manage them locally?
How do you share secrets withthe team? What do you do in your
CI environment? What should youdo? You know what I mean? How

(37:02):
should you do that?
And then you should pitch thatto Jeffrey. Be like, I've got a
5 episode series that I wouldlove to talk about managing your
ENVs among a team. Yeah. Youshould do that. After they're
kinda you maybe.
Or maybe before they're kindayou, you tell 1Password, hey,
we're really interested intalking about this. This is how
we're doing it. We're currentlyusing 1Password. We'd love to
have you sponsor the conference.Yeah.

(37:23):
I can talk about it from thestage.

Michael (37:25):
That'd be good. Yeah. Agile bits to to sponsor the
conference. That'd be nice.

Jake (37:28):
That would be cool.

Michael (37:31):
Lots of lots of stuff on the go. All of our our
schedule's out now.

Jake (37:35):
Nice.

Michael (37:36):
We published all the Genoa topics. We we haven't
published the names and thetopics together. We've published
the topics. And the speakers aredoing their their final intro
videos at the moment, so we'reputting out 2 weeks over the
next 6, 8 weeks or so. As theyall come out and they'll
introduce themselves and theirown topics and and we've got
some we've got some really funones this year as well.

Jake (38:00):
That's fun. The site is looking really nice.

Michael (38:02):
Yeah. It's going well. I need to fix up the, the
contrast of the yeah. I have tofix up the contrast of the
schedule. We've got a bit ofblue on blue that is not
legible, which I like I didn'teven think about it because like
it looked okay to me and it waswithin like everything else it

(38:23):
fit.
So terrorist banging on the dog.Excuse me.

Jake (38:33):
Oh, it's hilarious.

Michael (38:35):
Yeah. So I I gotta get that fixed up, but we're, you
know, into the design ofconference bags, and we've got
the proof for the conference tshirts and we've got a little
little monkey here just got backfrom Kinder gym. And, yeah. So
all that's happening at themoment. We're into the last sort

(38:57):
of 3 and a bit ish weeks ofearly bird sales.
So all all going going wellthere. So

Jake (39:07):
It's looking really nice too. The site looks awesome.
Very excited.

Michael (39:09):
Yeah. Oh, well. Going well.

Jake (39:14):
Very good, my friend. Well, I can tell your kids are
home. You probably need to gosay hi. Give that little one a
hug and a squeeze. Yeah.
Absolutely. So I can let you go,man. Hey, folks. Thanks so much
for hanging out with us.Michael, what episode is this 1?

Michael (39:27):
What one? On 60.

Jake (39:28):
160, folks. Find show notes for this episode at north
meets south audio slash 160. Hitus up on twitter
Ready to be a podcaster ofchoice. 5 stars would be
amazing.
See you next time, folks. 2weeks. Later. Bye.
Advertise With Us

Popular Podcasts

Crime Junkie

Crime Junkie

Does hearing about a true crime case always leave you scouring the internet for the truth behind the story? Dive into your next mystery with Crime Junkie. Every Monday, join your host Ashley Flowers as she unravels all the details of infamous and underreported true crime cases with her best friend Brit Prawat. From cold cases to missing persons and heroes in our community who seek justice, Crime Junkie is your destination for theories and stories you wonโ€™t hear anywhere else. Whether you're a seasoned true crime enthusiast or new to the genre, you'll find yourself on the edge of your seat awaiting a new episode every Monday. If you can never get enough true crime... Congratulations, youโ€™ve found your people. Follow to join a community of Crime Junkies! Crime Junkie is presented by audiochuck Media Company.

24/7 News: The Latest

24/7 News: The Latest

The latest news in 4 minutes updated every hour, every day.

Stuff You Should Know

Stuff You Should Know

If you've ever wanted to know about champagne, satanism, the Stonewall Uprising, chaos theory, LSD, El Nino, true crime and Rosa Parks, then look no further. Josh and Chuck have you covered.

Music, radio and podcasts, all free. Listen online or download the iHeart App.

Connect

ยฉ 2025 iHeartMedia, Inc.