Skip to content

kyrylo-kundik/SpendLess-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Junction Server Part Development

Needed environment:

Basic Setup:

Non docker users

  1. Create a new virtual environment with python -m venv venv and activate it with source venv/bin/activate
  2. Install app package with pip install -e .
  3. Start postgres database server
  4. 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
  1. Create database with POSTGRES_DB name
  2. Start migrations alembic upgrade head (sometimes you will need to run migrations just before the start)

Docker users

  1. 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
  1. Build an image with docker-compose build
  2. Start postgres container with docker-compose up postgres

Start the app:

Non docker users

  1. Start server gunicorn -w 4 -b 0.0.0.0:$APP_PORT "main:application"

Docker users

  1. Start the app container docker-compose up web

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages