Matchu
9310a250d6
As an exercise, I've wiped the box clean, and I'm reinstalling from the scripts! :3 I added the SSH hardening rules to the playbook instead of doing them by hand this time. I made a mistake with creating `/srv/impress-2020`, right, you need to *say* what it should be created *as* for the creation step to work! I also guess my recent pm2 changes made it not actually be willing to start the app anymore, because `/srv/impress-2020/current` doesn't exist or have `node_modules` yet. I'm doing a cute thing where I create a placeholder app during setup, so there's always something to run, without introducing the complexities of a real deploy to the setup process. And right, of course, we need to install nginx before running certbot! But we need to add certbot config *after* running certbot! And then just some misc cleanups for consistency and correctness! |
||
---|---|---|
.. | ||
playbooks | ||
inventory.cfg | ||
README |
Impress 2020 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!