Clone the repo.
First run:
❯ docker-compose build
❯ docker-compose up
Open a browser to http://127.0.0.1:8000/
Enjoy the headaches 😁
❯ docker-compose run --rm app sh -c "python manage.py createsuperuser"
Create an empty folder with the apps name first in backend/apps/name_of_the_app
then run:
❯ docker-compose run --rm app sh -c "python manage.py startapp name_of_the_app ./apps/name_of_the_app"
❯ docker-compose run --rm app sh -c "python manage.py makemigrations"
❯ docker-compose run --rm app sh -c "python manage.py migrate"
❯ docker-compose run --rm app sh -c "python manage.py shell"
To run all the tests.
❯ docker-compose run --rm app sh -c "python manage.py test apps/*"
Or run the following for a specif app in the project.
❯ docker-compose run --rm app sh -c "python manage.py test apps/name_of_the_app"
❯ docker-compose -f docker-compose-deploy.yml down --volumes
❯ docker-compose -f docker-compose-deploy.yml build
❯ docker-compose -f docker-compose-deploy.yml up
❗️Don't forget to kill the "prod" volumes after testing. (Run the first command)
❯ docker-compose -f docker-compose-deploy.yml run --rm app sh -c "python manage.py createsuperuser"
❗️❗️❗️ After cloning the project on the production server, cd into cloudcruder
folder and:
❯ cp .env.sample .env
Then update the everything except the DB_USER
value.
Now you can run the app:
❯ docker-compose -f docker-compose-deploy.yml up -d
- SSH to the server.
- cd into
cloudcruder
folder - Pull the changes, run
git pull origin main
- Run the following commands:
❯ docker-compose -f docker-compose-deploy.yml build app
❯ docker-compose -f docker-compose-deploy.yml up --no-deps -d app