Skip to content

Commit

Permalink
add volume to share data between scraper, chat, cleo
Browse files Browse the repository at this point in the history
  • Loading branch information
mdr223 committed Sep 7, 2023
1 parent 7974d23 commit f3d641b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploy/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ services:
- sender_user
- sender_pw
- openai_api_key
volumes:
- a2rchi-data:/root/data/

chat:
build:
Expand All @@ -34,6 +36,8 @@ services:
OPENAI_API_KEY_FILE: /run/secrets/openai_api_key
secrets:
- openai_api_key
volumes:
- a2rchi-data:/root/data/

mailbox:
build:
Expand Down Expand Up @@ -74,6 +78,12 @@ services:
build:
context: ..
dockerfile: deploy/scraper/Dockerfile-scraper
volumes:
- a2rchi-data:/root/data/

volumes:
a2rchi-data:
external: true

secrets:
imap_user:
Expand Down
7 changes: 7 additions & 0 deletions deploy/dev-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

# create volume if it doesn't already exist
exists=`docker volume ls | awk '{print $2}' | grep a2rchi-data`
if [[ $exists != 'a2rchi-data' ]]; then
docker volume create --name a2rchi-data
fi

# start services
echo "Starting docker compose"
cd A2rchi/deploy/
docker compose up -d --build --force-recreate --always-recreate-deps
Expand Down

0 comments on commit f3d641b

Please sign in to comment.