Skip to content
Snippets Groups Projects
README.md 878 B
Newer Older
  • Learn to ignore specific revisions
  • David Huss's avatar
    David Huss committed
    
    
    David Huss's avatar
    David Huss committed
    ## Run dev-server with poetry
    
    To make a development server run on localhost:
    ```python3
    
    David Huss's avatar
    David Huss committed
    export FLASK_APP=stechuhr_server/server.py
    
    export FLASK_ENV=development
    
    David Huss's avatar
    David Huss committed
    poetry run flask run --cert=adhoc
    
    David Huss's avatar
    David Huss committed
    ## Run with python3-ven in production
    
    Make sure `python3-venv` is installed:
    
    ```bash
    sudo apt install python3-venv
    ```
    
    Then clone the repo and enter it:
    
    ```bash
    git clone ssh://git@code.hfbk.net:4242/pandemic_response/stechuhr-server.git
    cd stechuhr-server
    ```
    
    Create a new venv environment, activate it, install the reuqirements from requirements.txt and start the server
    ```
    python3 -m venv env
    source env/bin/activate
    pip3 install -r requirements.txt
    python3 stechuhr_server/server.py
    ```
    
    Check the output to find the config directory. You might want to run it as a different user tho.
    
    There is also a systemctl unit file that you probably need to change to your needs