⚠ Note for Windows users
This documentation is written for Linux-based systems. If you are using Windows, please be aware of some subtle changes:
- Do not use the built-in commad-line, but the PowerShell. Some syntax will not work on the command-line.
- There is no sudo. Most of the commands will work without the sudo. If you encounter permission errors, please run your PowerShell as administrator.
Install docker and docker-compose. Install git.
First clone the repos:
git clone https://github.com/ownrecipes/OwnRecipes.git
cd OwnRecipes
git clone https://github.com/ownrecipes/ownrecipes-api.git
git clone https://github.com/ownrecipes/ownrecipes-web.git
Then run it:
sudo docker-compose --profile all build
sudo docker-compose --profile all up
Seed the database.
To create a super user:
sudo docker-compose run --rm --entrypoint 'python manage.py makemigrations' api
sudo docker-compose run --rm --entrypoint 'python manage.py migrate' api
sudo docker-compose run --rm --entrypoint 'python manage.py createsuperuser' api
Follow the prompts given to create your user. You can do this as many times as you like.
If you want to add some test data you can load a few recipes and some news data. This data isn't really needed unless you just wanna see how the app looks and if its working.
sudo docker-compose run --rm --entrypoint 'sh' api
./manage.py loaddata course_data.json
./manage.py loaddata cuisine_data.json
./manage.py loaddata news_data.json
./manage.py loaddata recipe_data.json
./manage.py loaddata ing_data.json
The set up is complete and everything should be up and running.
You can visit the Admin Site, to create some more users, customize the news, or manage some lists.
Or you can straight away log in to the OwnRecipes web app. By default, the url will be http://localhost:8080
.
OwnRecipes will shut down with your system. You can simply launch OwnRecipes by running:
cd OwnRecipes
sudo docker-compose --profile all up
When updating your local version that is deployed via docker, you have to keep in mind that the installed dependencies are being cached to reduce startup times.
Thus, when you update your local version and the new version requires new dependencies (or new package versions), you will have to clean up the related local docker stuff.
First, clean up everything:
cd OwnRecipes
sudo docker-compose --profile all down
Then, update your local repositories:
cd ownrecipes-api
git checkout development
git pull
cd ../
cd ownrecipes-web
git checkout development
git pull
Finally, build and run OwnRecipes, as you usually would.