Skip to content

Stark-Mountain/schedule_bot

Repository files navigation

Schedule bot

Development

Since we're cool and modern boys, we use docker for both dev & prod (for possible quick scaling? :D). Local dev is simple: just run aiohttp service in docker with src mounted.

cp .env.example .env
make run

Testing

Pytest for aiohttp, run with:

make test

Note what in testing environment postgres isn't mounted, so you need to re-create models from scratch every time.

Production

Production build is bit harder, we use caddy & certbot for easy ssl cert management:

# populate examples with actual data
cp .example.env .env
cp config/Caddyfile.example config/Caddyfile
sudo make deploy

Possibly, webpack would be used for bundling js for admin dashboard to caddy's container.

TODO:

Infrastructure tasks:

  • Project description
  • local docker development
  • test structure
  • production configuration with nginx
  • aiotg (polling)
  • Database initialization
  • Middleware
  • db migrations
  • db schema
  • ci/cd
  • rolling updates (zero downtime)
  • Remove Dockerfile.testing

Coding tasks:

  • aiotg (webhook for production)
  • REA parser implementation
  • vk & fb support

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors