mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
Added basic redis + redis insights config for docker and ansible
This commit is contained in:
@@ -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,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
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
maxmemory 100mb
|
||||
maxmemory-policy allkeys-lru
|
||||
Reference in New Issue
Block a user