ben
ben
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
could also use something like GCP secret manager or Doppler, but I like that dotenvx is all client-side and lets me see what new secrets we're introducing in PR diffs
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
I also have ci jobs running via Github actions. I don't want to set 10 env vars in both railway and github actions. Easier to just have those env vars in my code (encrypted ofc)
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
Main thing is that it enables easier collaboration and avoids me having to log into each platform I use to configure env vars let's say I start doing billing stuff with stripe. I can just add my encrypted stripe api key to the .env.development and .env.production files. i commit those changes, and now my teammates can see and use those env vars without having to take action to pull them down from somewhere
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
yeah that's one reason
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
gotcha, thanks
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
afaict from the docs, nixpack config only applies after the app source directory has been created by coping everything from my project root
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
Another option is creating a docker image for my app, but it would be nice if I could just set one piece of config and continue to take advantage of nixpacks
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
But it would be simpler if I didn't have to do this
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
I do have one workaround for now, which is creating a hardlink from my parent directory .env.production file to the /frontend dir
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
@Joshie I made an explicit choice to use dotenvx. All of my secrets in these files are encrypted, ex:
# Database configuration
DB_HOST="encrypted:BNr24F4vW9CQ37LOXeRgOL6QlwtJfAoAVXtSdSfpicPDHtqo/Q2HekeCjAWrhxHy+VHAB3QTg4fk9VdIoncLIlu1NssFO6XQXN5fnIjXRmp5pAuw7xwqVXe/1lVukATjG0kXR4SHe45s4Tb6fEjs"
# Database configuration
DB_HOST="encrypted:BNr24F4vW9CQ37LOXeRgOL6QlwtJfAoAVXtSdSfpicPDHtqo/Q2HekeCjAWrhxHy+VHAB3QTg4fk9VdIoncLIlu1NssFO6XQXN5fnIjXRmp5pAuw7xwqVXe/1lVukATjG0kXR4SHe45s4Tb6fEjs"
and I simply set a single standard env var that lets me decrypt the rest of them. I find this easier to manage, and makes it simpler to share secrets with the rest of my team.
19 replies
RRailway
Created by ben on 7/1/2024 in #✋|help
How to copy files in parent directory into app source directory
bde9c131-9e19-41c5-878a-7a26a99effb4
19 replies