Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and packaging updates used for Fanime 2023 #66

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leftsock
Copy link

@leftsock leftsock commented Jun 8, 2023

commit instructions used to install invenflask on production (bebop2) for Fanime 2023. The instructions: init scripts, whl instructions, restarting the service.

Note that these instructions are already out-of-date.

Comment on lines +56 to +97
ssh 172.18.1.32
sudo useradd --create-home invenflask
sudo chown -R kjw /home/invenflask

# from laptop/dev environment:
# Note this may need redoing i.e. config.py is edited or the db needs wiping
scp database.db config.py 172.18.1.32:/home/invenflask/

# back on server, change ownership to invenflask so it can write.
# TODO: instead make it writable by group invenflask
ssh 172.18.1.32
sudo chown invenflask /home/invenflask/database.db

# AS KJW, because I'm lazy and it's easier if I own the files
ssh [email protected]
cd /home/invenflask
python3 -m venv venv
. venv/bin/activate
pip install gunicorn

# verify all the pieces are there:
venv/bin/gunicorn -w 1 --bind 0.0.0.0:8000 wsgi:app
```

## Deployment via wheel

Build `.whl`
```
pip wheel .
scp init.d_invenflask init.sh wsgi.py invenflask-*.whl 172.18.1.32:/home/invenflask/
```

Upgrade and restart server
```
ssh [email protected]
cd /home/invenflask
. venv/bin/activate
pip3 install invenflask-2.6.1.dev0+gb4afd65.d20230524-py2.py3-none-any.whl
sudo ./init.d_invenflask install
sudo /etc/init.d/invenflask restart
# TODO: turn this into a service so it auto restarts after a crash. should also fix the "stop" bug in initd_invenflask
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make these generic? I don't want user specific installation instructions in a README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants