-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker container for the Demo Application (#11)
* npm in Docker, Redis Insight, redismod * Remove package.log and update ioredis * Update Dockerfile and script's name * Update Docker Compose Co-authored-by: Mikhail <47795110+mikhailredis@users.noreply.github.com>
- Loading branch information
1 parent
8e4604b
commit b23b09e
Showing
7 changed files
with
122 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node | ||
WORKDIR /app | ||
|
||
# Install depenencies | ||
COPY package.json . | ||
COPY yarn.lock . | ||
RUN yarn install | ||
|
||
# Install Redis tools | ||
RUN apt update | ||
RUN apt install -y redis-tools | ||
|
||
# Copy Gears and application | ||
COPY gears ./gears | ||
COPY src ./src | ||
COPY ./docker-cmd.sh . | ||
|
||
# Run | ||
CMD [ "./docker-cmd.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Install StreamReader for Time-Series | ||
cat gears/timeseries.py | redis-cli -h redis -x RG.PYEXECUTE | ||
|
||
# Install StreamReader for Orders | ||
cat gears/orders.py | redis-cli -h redis -x RG.PYEXECUTE | ||
|
||
# Run Simulation | ||
echo "Starting Customers & Orders simulation" | ||
npm run simulation redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
{ | ||
"author": "Mikhail Volkov", | ||
"dependencies": { | ||
"ioredis": "^4.17.3", | ||
"ioredis": "^4.28.2", | ||
"lodash": "^4.17.21" | ||
}, | ||
"description": "Pop-up store using RedisTimeSeries, RedisGears and Redis Datasource for Grafana", | ||
"license": "Apache-2.0", | ||
"name": "redis-pop-up-store", | ||
"scripts": { | ||
"docker:build": "docker-compose build", | ||
"redis-cli": "docker exec -it redis redis-cli", | ||
"register": "./register.sh && docker exec -it redis redis-cli RG.DUMPREGISTRATIONS", | ||
"simulation": "npm i; node src/pop-up-store.js", | ||
"start": "docker-compose pull && docker-compose up", | ||
"stop": "docker-compose down", | ||
"upgrade": "yarn upgrade --latest" | ||
}, | ||
"version": "2.0.0" | ||
"version": "2.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.