- Simple 'Note' App run with two containers:
- Frontend app w/ Reacct
- API and SQLite DB w/ Django
-
Make sure docker desktop is installed for non-Linux users!!! (Creates a linux vm so you can run containers).
-
You need to build the images first with:
docker-compose build
(run where docker-compose.yaml is located).- Run the build commmand whenever you make changes to the code .
-
Start the site with:
docker-compose up
(run where docker-compose.yaml is located)- Both containers (backend and frontend) will run
- Go to localhost:3000
-
ALWAYS remember to stop and remove containers with
docker-compose down
command.
- Create a
.env
file at /backend and add the key
- React app
- Run without docker:
npm start
- Django api + SQLite database
- Run without docker:
python3 manage.py runserver
- Virtual Environments and Packages
- Python virtual env, activate with:
- MacOS/Unix:
source tutorial-env/bin/activate
- Windows:
tutorial-env\Scripts\activate.bat
- MacOS/Unix: