Added basic redis + redis insights config for docker and ansible

This commit is contained in:
Graeme Harris
2022-12-31 01:48:37 +02:00
parent 4d76355dc8
commit 5a18fba9e6
3 changed files with 47 additions and 0 deletions
+18
View File
@@ -32,6 +32,24 @@
- name: oasst-postgres
- name: oasst-postgres-web
- name: Setup redis
community.docker.docker_container:
name: "{{ item.name }}"
image: redis
state: started
restart_policy: always
network_mode: oasst
volumes:
- redis:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 2s
timeout: 2s
retries: 10
ports:
- 6379:6379
command: redis-server /usr/local/etc/redis/redis.conf
- name: Set up maildev
community.docker.docker_container:
name: oasst-maildev
+27
View File
@@ -27,6 +27,29 @@ services:
timeout: 2s
retries: 10
# Redis - caching + rate limiting on BE
redis:
image: redis
restart: always
ports:
- 6379:6379
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 2s
timeout: 2s
retries : 10
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- redis:/data
# insights host - redis:6379
redis-insights:
image: redislabs/redisinsight:latest
ports:
- 8001:8001
volumes:
- redis:/data
# This DB is for Web Authentication and data caching.
webdb:
image: postgres
@@ -100,3 +123,7 @@ services:
ports:
- "3000:3000"
command: bash wait-for-postgres.sh node server.js
volumes:
redis:
driver: local
+2
View File
@@ -0,0 +1,2 @@
maxmemory 100mb
maxmemory-policy allkeys-lru