impress/deploy
Emi Matchu 345a45ee0c Add slow query logging to MariaDB config
The database did a weird thing today, where it wouldn't even respond to
the usual stop signal, I had to fully `kill -9` it??

I didn't see anything in the logs indicating what it was busy doing,
and people online seem to describe having this problem sometimes but
with no obvious solution.

For now, I'll try turning on the slow query logger, to see if that
might give us hints about whether there was like a denial-of-service
query attack hitting us or something?
2024-02-26 11:06:51 -08:00
..
files Finish migrating to Ruby 3.3.0 2024-02-22 12:05:02 -08:00
deploy.yml Use local gems instead of installing from web when deploying, oops! 2024-02-22 12:16:59 -08:00
inventory.cfg Remove beta.impress.openneo.net from deploy setup 2023-10-25 15:22:50 -07:00
README Create setup.yml deploy script 2023-10-23 19:05:09 -07:00
setup.yml Add slow query logging to MariaDB config 2024-02-26 11:06:51 -08:00

Dress to Impress is deployed to a VPS server. We use this Ansible Playbook to
automate the environment setup!

We expect to be deploying to Ubuntu 20.04 LTS, initially with nothing
installed. The user you deploy with should have sudoers access. That should be
all it takes!

First, run `yarn deploy:setup` in the app root, to run the `setup.yml`
playbook. This will prompt you for your root password, to set up system
dependencies. It should be safe to re-run this, including if you add a new
dependency to the playbook, because the steps are non-destructive and Ansible
will skip steps that are already satisfied.

Then, to deploy a new version of the app, run `yarn deploy`. This will build
the app from the code on your machine, then send the source and build output
to the remote machine, and switch it to be the new production version. Nice!

Note that the setup script references a file named `production.env`, which is
gitignored because it contains sensitive information, like database passwords.
You should create a `production.env` file in the local `deploy/files`
directory, to be copied to the remote server and used as its environment
variables.