my ansible helper for deploying
Find a file
2022-09-04 00:21:28 +02:00
playbook.yml Switch to a A/B model 2022-09-04 00:14:51 +02:00
README.md add README 2022-09-04 00:21:28 +02:00

my method of deploying foundkey

i don't really like accidentally messing up an instance by messing with its source code and node_modules while the service is on, so i made this

there are two staging environments, sunrise and sunset, and a bunch of symlinks. the systemd service (nixos-managed) is set to launch the server in the directory under the symlink current

the playbook updates the environment that is not marked as current and then switches up the symlinks and restarts the systemd service

this method depends on my patch to foundkey that turns media uploads location into a configurable variable rather than a guessed constant

initially i wanted to just do a new fresh build every time but apparently node-gyp doesn't cache much between various locations so it was taking too long

todos?

  • migrations
  • blue-green rollback