Skip to content

Commit

Permalink
Added dev docker compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
Zillibub committed Apr 26, 2023
1 parent db4cdc9 commit bdf67a7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,18 @@ Spin up only 2 containers from docker-compose.yaml (by deleting all services exc
Make sure you have python 3.10 or 3.11 installed

1. Navigate to `/application` folder

2. Install redis server `sudo apt install redis-server`
3. Start redis server `sudo service redis-server start`
4. Start mongo DB `sudo docker run -d -p 27017:27017 --name test-mongo mongo:latest`
5. Export required variables
2. Run `docker-compose -f docker-compose-dev.yaml build && docker-compose -f docker-compose-dev.yaml up -d`
3. Export required variables
`export CELERY_BROKER_URL=redis://localhost:6379/0`
`export CELERY_RESULT_BACKEND=redis://localhost:6379/1`
`export MONGO_URI=mongodb://localhost:27017/docsgpt`
6. Install dependencies
4. Install dependencies
`pip install -r requirements.txt`
7. Prepare .env file
5. Prepare .env file
Copy .env_sample and create .env with your openai api token
8. Run the app
6. Run the app
`python wsgi.py`
9. Start worker with `celery -A app.celery worker -l INFO`
7. Start worker with `celery -A app.celery worker -l INFO`

To start frontend
1. Navigate to `/frontend` folder
Expand Down
20 changes: 20 additions & 0 deletions docker-compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3.9"

services:

redis:
image: redis:6-alpine
ports:
- 6379:6379

mongo:
image: mongo:6
ports:
- 27017:27017
volumes:
- mongodb_data_container:/data/db



volumes:
mongodb_data_container:

0 comments on commit bdf67a7

Please sign in to comment.