- python3.7+
- postgres9.6+
- or Docker with docker-compose
Non docker users
- Create a new virtual environment with
python -m venv venv
and activate it withsource venv/bin/activate
- Install app package with
pip install -e .
- Start postgres database server
- Create new
.env
file (something like this schema and your parameters):
POSTGRES_USER=postgres
POSTGRES_DB=junction_server
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_EXTERNAL_PORT=5432
APP_PORT=5000
APP_MODE=development
- Create database with
POSTGRES_DB
name - Start migrations
alembic upgrade head
(sometimes you will need to run migrations just before the start)
Docker users
- Create new
.env
file (something like this schema and your parameters):
POSTGRES_USER=postgres
POSTGRES_DB=junction_server
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_EXTERNAL_PORT=5432
APP_PORT=5000
APP_MODE=development
- Build an image with
docker-compose build
- Start postgres container with
docker-compose up postgres
Non docker users
- Start server
gunicorn -w 4 -b 0.0.0.0:$APP_PORT "main:application"
Docker users
- Start the app container
docker-compose up web