Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 1.18 KB

README.md

File metadata and controls

53 lines (40 loc) · 1.18 KB

Hello API

An application providing greeting and echo operations via REST API.

Local deployment

Initial setup

  1. You'll need virtualenv tool, alternatively you can install it with your OS package manager
    pip install virtualenv
  2. Create new virtual environment with python3
    virtualenv -p python3 venv
  3. Activate it
    . venv/bin/activate
  4. Install application requirement into active virtual environment
    pip install -r requirements.txt

Run application

Just as for any Django app do

./manage.py runsever

Docker deployment (production aimed)

You will need to generate a SECRET_KEY for Django, see Django doc for details on how it's used. Recommended length is not less then 50 chars.

  1. Build docker image

    docker build -t impulse1_test .
  2. Run container

    docker run -d --name impulse1_test_instance \
       -e SECRET_KEY=${SECRET_KEY} \
       impulse1_test
  3. See src/impulse1_test/settings_prod.py for list of supported environment variables