Photo by nikko osaka on Unsplash

In a previous article, we have built the “skeleton” for our future SPA. We have already installed PostgreSQL, Redis, Nginx, and Adminer (tool for DB management). In this part, we will develop container with python code for /api/* routes and cover it with tests.


If you have no time to read, just exec next bash commands:

and run a browser with the http://localhost.

Let’s talk about what we will do in this part:

Photo by frank mckenna on Unsplash

Motivation: In this article, we will build a bunch of Docker containers and go step by step through the process of building the chat SPA (single page application) with the basic authorization. We will be using:

  • Vue — JavaScript front-end framework;
  • Python Sanic — asynchronous framework for back-end (authorization API and WebSocket server);
  • PostgreSQL as a database (in our case store for users);
  • Redis for session storage;
  • Nginx as the proxy server for routing of incoming requests between our services.
  • Adminer — a tool for working with database (personally I prefer console, but who knows).

To push all those things…

Vitaliy Kolesov

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store