Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Redis #174

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
run: |
npm install

- name: Start Docker
run: npm run docker:start

- name: Build TS
run: |
npm run build
Expand All @@ -31,6 +34,9 @@ jobs:
run: |
npm run test:ci

- name: Stop Docker
run: npm run docker:stop

automerge:
needs: build
runs-on: ubuntu-latest
Expand Down
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.8"
services:
redis:
image: "redis:7-alpine"

command: redis-server --requirepass sOmE_sEcUrE_pAsS

ports:
- "6379:6379"

environment:
- REDIS_REPLICATION_MODE=master

wait_for_redis:
image: "redis:7-alpine"

depends_on:
- redis
command: sh -c "/wait && /sayhello"
environment:
- WAIT_HOSTS=redis:6379
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"test:ci": "npm run lint && npm run test:coverage",
"lint": "eslint . --ext .ts && prettier --check --log-level warn \"**/*.{json,md,ts}\" !CHANGELOG.md",
"lint:fix": "eslint . --fix && prettier --write --log-level warn \"**/*.{json,md,ts}\" !CHANGELOG.md",
"docker:start": "docker-compose -f docker-compose.yml up --build -d redis && docker-compose -f docker-compose.yml up --build -d wait_for_redis",
"docker:stop": "docker-compose -f docker-compose.yml down",
"version": "auto-changelog -p && git add CHANGELOG.md"
},
"dependencies": {
Expand Down
Loading