diff --git a/README.md b/README.md index c23fa74..0171da5 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,7 @@ run: ```docker compose up --build``` run: ```docker-compose exec backend python manage.py createsuperuser``` and create a user in the backend. the frontend runs on http://localhost:5173 + +local dev: +enables live updates of the code during development, no rebuild needed: +```docker-compose -f docker-compose.yml -f docker-compose.override.yml up``` diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000..9e78ec2 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,8 @@ +services: + backend: + volumes: + - /path/to/local/backend:/app + + frontend: + volumes: + - /path/to/local/frontend:/app diff --git a/docker-compose.yml b/docker-compose.yml index b33ab3c..d465424 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,9 +11,9 @@ services: - "5432:5432" backend: - build: ./backend - volumes: - - ./backend:/app + build: + context: git://github.com/your-org/my-project-backend.git#main # Replace with your backend repo URL + dockerfile: Dockerfile ports: - "8000:8000" environment: @@ -27,7 +27,9 @@ services: - db frontend: - build: ./frontend + build: + context: git://github.com/your-org/my-project-frontend.git#main # Replace with your frontend repo URL + dockerfile: Dockerfile ports: - "5173:5173" environment: