A project that runs a Flask API server and an app via vite, four separate containers, using Docker Compose. Here are four components:
- Frontend [React, Tailwind, Vite]
- API [Python Flask]
- Database [MySql]
- Redis as API Caching Layer
Clone this repository first-
$ git clone [email protected]:SadikurSadik/simple-todo.git
Now cd into Project Directory
$ cd simple-todo
For development, the flask-api/
, react-app/
and db
directories have their own docker containers, which are configured via the docker-compose.yml file.
$ docker-compose up
The client server is spun up at localhost:5173
and flask api server running on localhost:5000
The local directories are mounted into the containers, so changes will reflect immediately. However, changes to package.json or requirements.txt will likely need to a rebuild:
$ docker-compose down && docker-compose build && docker-compose up
I have a blog post on how this project work, you can check it out.
Have a good day. Thank you.