forked from OpenNeo/impress
Emi Matchu
b18dd115a1
Still need to test the app with it, and getting this to deploy right will be a bit tricky! Here's my thinking for sequencing once the code is ready: 1. Temporarily modify `deploy.yml` to push the version, but not set it as `current` or restart the app. 2. Update the service file to use Ruby 3.3.0 and reference that version directly (instead of `current`), and restart the app. 3. Once it's already running, link that version as `current`. 4. Update the service file to reference `current` as usual, and restart the app. |
||
---|---|---|
.. | ||
files | ||
deploy.yml | ||
inventory.cfg | ||
README | ||
setup.yml |
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.