Bot update: refactoring and redis

This commit is contained in:
2024-02-11 14:21:26 +03:00
parent 74b605c778
commit 82c3fd9034
3 changed files with 19 additions and 3 deletions

View File

@@ -6,4 +6,4 @@ DATABASE_PORT=5432
SERVER_PORT=3000 SERVER_PORT=3000
ACCESS_TOKEN=123 REDIS_PASSWORD=123

View File

@@ -18,7 +18,21 @@ services:
volumes: volumes:
- neuro_postgres_db:/var/lib/postgresql/data - neuro_postgres_db:/var/lib/postgresql/data
restart: always restart: always
redis:
container_name: neuro_redis
image: redis:alpine
command: redis-server --requirepass ${REDIS_PASSWORD}
restart: always
ports:
- "6379:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- redis_data:/data
networks:
- labnet
backend: backend:
container_name: neuro_backend container_name: neuro_backend
build: ./backend build: ./backend
@@ -45,10 +59,12 @@ services:
- labnet - labnet
depends_on: depends_on:
- backend - backend
- redis
restart: always restart: always
volumes: volumes:
neuro_postgres_db: neuro_postgres_db:
driver: local driver: local
redis_data:
networks: networks:
labnet: labnet: