-
Notifications
You must be signed in to change notification settings - Fork 2
Add skill-search service #1
base: master
Are you sure you want to change the base?
Conversation
|
Switched port to 3001 within the container, and it works. ¯_(ツ)_/¯ |
|
I think I get it. I don't need to expose port 3001 outside of the container, since all the communication is happening within the docker-compose container(s). |
| skill-search: | ||
| build: | ||
| context: ./skill-search | ||
| restart: unless-stopped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an image: block here to tag the image as fearlesstech/cowbot-skill-search:latest, similar to line 22 above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will have to point me to some instructions for publishing an image to our docker hub.
skill-search/README.md
Outdated
| * [x] perform etl tasks on a reoccurring basis (weekly/daily/hourly) | ||
| * [x] database location specified by environment | ||
| * [x] run `yarn run users:refresh` and `yarn run users:refresh` with cron in container | ||
| * [ ] steps for creating a database on first-run (in Dockerfile?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest creating a kick-off script to set as the CMD that will check for a db file, and create one if it doesn't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using a volume to link the sqlite database file to a location within the container. From what I understand, we should keep the data and the container separate. I'll probably need some help setting this up the right way.
* remove unnecessary db columns (email, display_name, image_url) * merge users:refresh and skills:refresh jobs into one data:refresh job * fix node/npm warnings
| .skill-search.env | ||
| command: "node ./src/jobs/refreshUsers.js" | ||
| volumes: | ||
| - ./skill-search/data/skill-search.db:/app/data/skill-search.db:rw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: refactor this docker-compose file
Need to sort out the following error when running
docker-compose up...Works when skill-search url is
localhost:3001and services launched manually: