I'm not sure if somebody will want to create a fork or participate in development of this project, but at least we save a few comments for myself: how to bootstrap this application. Nothing to tough, but still good to know.
- Check if you have
python
3.8+ (check deadsnakes if not: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa)
python -V
- Install
nvm
: https://github.com/nvm-sh/nvm#install--update-script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.1/install.sh | bash
- Install latest
node
nvm install node
- Install
node
modules
npm install
- Install
poetry
: https://python-poetry.org/docs/#installation
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
- Setup
poetry
to use local virtual environment
poetry config virtualenvs.in-project true
- Create virtualenv and install project dependencies
poetry install
- Create development SSL certificates (install
make
if don't have it, likesudo apt install make
)
make devssl
- Create a
secrets
file (see further instructions in the example comments):
cp secrets.example secrets
vi secrets
- Initialize database (make sure, that you have working
docker
: https://docs.docker.com/engine/install/ubuntu/)
poetry run docker-compose up database
- Apply database migrations (or restore a dump if you have one)
poetry run flask db upgrade
# or if dump
cat dump.sql | poetry run docker-compose exec -T database mysql -p<root-password> rembish_org
- Check if you have the right
localhost
alias:
sudo vi /etc/hosts
# Add dev.rembish.org to 127.0.0.1
- Using
flask
WSGI server:
env $(cat secrets | xargs) poetry run flask run
# Server will be spawned on https://dev.rembish.org:5000
- Using
docker
:
poetry run docker-compose up
# Server will be started on standard HTTPS port: https://dev.rembish.org
- Don't forget to add your changes to
CHANGELOG.md
- To deploy new version:
- increase version:
poetry run flask version -i [patch|minor|major]
- commit changes: git commit -a -m "Release
X.Y.Z
- tag 'em:
git tag vX.Y.Z
- and push:
git push --tags origin main
- increase version:
- Github Actions will deploy the application automatically
- Check it on https://rembish.org