-
-
Notifications
You must be signed in to change notification settings - Fork 50
Add redis cache #3579
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 cache #3579
Changes from all commits
8a3ead7
828b836
be04055
52b1853
9562c54
f330638
cd180c6
5dbfe16
40f712d
e4ae483
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,23 +161,38 @@ services: | |
- backend | ||
|
||
alerting: | ||
image: registry.gitlab.com/finestructure/swiftpackageindex:${VERSION} | ||
<<: *shared | ||
depends_on: | ||
- migrate | ||
entrypoint: ["/bin/bash"] | ||
command: ["-c", "--", | ||
image: registry.gitlab.com/finestructure/swiftpackageindex:${VERSION} | ||
<<: *shared | ||
depends_on: | ||
- migrate | ||
entrypoint: ["/bin/bash"] | ||
command: ["-c", "--", | ||
"trap : TERM INT; while true; do ./Run alerting --env ${ENV} --time-period ${ALERTING_TIME_PERIOD:-4} --limit ${ALERTING_LIMIT:-2000}; sleep ${ALERTING_SLEEP:-300}; done" | ||
] | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 0.5GB | ||
restart_policy: | ||
] | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 0.5GB | ||
restart_policy: | ||
max_attempts: 5 | ||
networks: | ||
- backend | ||
networks: | ||
- backend | ||
|
||
redis: | ||
# Eventually we'll probably want to use redis/redis-stack-server:7.4.0-v1 here, | ||
# which excludes the RedisInsight GUI front-end. | ||
image: redis/redis-stack:7.4.0-v1 | ||
environment: | ||
REDIS_ARGS: '--maxmemory 4GB --maxmemory-policy allkeys-lru' | ||
ports: | ||
- '6379:6379' | ||
- '8001:8001' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll need to clarify the situation around the ports before deploying this in prod. I don't think they're open due to the firewall sitting in front of it but it needs double checking. We should be able to connect to the 8001 port for the insights GUI via an ssh tunnel/port forward. I did that i the past but not in a while - need to dig up the commands again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it’s a swarm, there may need to be firewalls opened between the hosts - I don’t think it’s available in prod based on the current network security groups. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the swarm hosts are in the same NSG and I'm pretty sure we only need to open 8001 (to Bastion) in case we want to use the Redis GUI. I've verified that this is working as intended on dev (which is technically also a swarm albeit with just one node). |
||
deploy: | ||
resources: | ||
limits: | ||
memory: 4.2GB | ||
networks: | ||
- backend | ||
|
||
migrate: | ||
image: registry.gitlab.com/finestructure/swiftpackageindex:${VERSION} | ||
|
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.
The
alerting:
section was indented with 4 spaces rather than 2 spaces like the rest.