Skip to content

Commit

Permalink
Merge pull request #124 from CakeCrusher/CakeCrusher/CD_in_docker
Browse files Browse the repository at this point in the history
volumes and hot reloading for continuous development in docker
  • Loading branch information
nfcampos authored Jan 18, 2024
2 parents 4200fe1 + ac54421 commit 6cbac86
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.env
.env.gcp.yaml
redis-volume/
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RUN rm poetry.lock

RUN pip install .

CMD exec uvicorn app.server:app --host 0.0.0.0 --port $PORT
CMD exec uvicorn app.server:app --host 0.0.0.0 --port $PORT --reload
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ services:
- redis
env_file:
- .env
volumes:
- ./backend:/backend
environment:
PORT: 8100
REDIS_URL: "redis://redis:6379"

frontend:
build:
context: frontend
volumes:
- ./frontend/src:/frontend/src
ports:
- "5173:5173" # Frontend is accessible on localhost:5173
environment:
Expand Down
3 changes: 3 additions & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
server: {
watch: {
usePolling: true
},
proxy: {
"^/(assistants|threads|ingest|runs)": {
target: process.env.VITE_BACKEND_URL || "http://127.0.0.1:8100",
Expand Down

0 comments on commit 6cbac86

Please sign in to comment.