Skip to content

Commit

Permalink
Support CBSUp
Browse files Browse the repository at this point in the history
  • Loading branch information
pomo-mondreganto committed Aug 30, 2023
1 parent d78887b commit 09a21d3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
__pycache__
.mypy_cache
/vol
/.env
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.PHONY: start
start:
docker-compose up --build -d
docker compose up --build -d

.PHONY: stop
stop:
docker-compose down -v
docker compose down -v

.PHONY: restart
restart:
docker-compose restart
docker compose restart

.PHONY: clean
clean:
Expand All @@ -19,4 +19,4 @@ reset: stop clean

.PHONY: logs
logs:
docker-compose logs -f
docker compose logs -f
15 changes: 7 additions & 8 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '2.4'

services:
farm:
build:
Expand All @@ -8,8 +6,9 @@ services:
volumes:
- ./server/app:/app
environment:
REDIS_URL: 'redis://redis:6379/1'
REDIS_URL: 'redis://redis:6379/0'
POSTGRES_DSN: 'host=postgres port=5432 user=farm password=farm dbname=farm'
SERVER_PASSWORD: ${SERVER_PASSWORD}
restart: unless-stopped
depends_on:
postgres:
Expand All @@ -22,7 +21,7 @@ services:
volumes:
- ./server/app:/app
environment:
CELERY_BROKER_URL: 'redis://redis:6379/0'
CELERY_BROKER_URL: 'redis://redis:6379/1'
POSTGRES_DSN: 'host=postgres port=5432 user=farm password=farm dbname=farm'
restart: unless-stopped
depends_on:
Expand Down Expand Up @@ -64,17 +63,17 @@ services:
- redis

redis:
image: redis:7.0.12-alpine
image: redis:7.2.0-alpine
restart: unless-stopped
command: [ "redis-server", "--appendonly", "yes" ]
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./vol/redis:/data

external_redis:
image: redis:7.0.12-alpine
image: redis:7.2.0-alpine
ports:
- "6378:6379"
restart: unless-stopped
command: [ "redis-server", "--appendonly", "yes", "--requirepass", "changeme" ]
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${EXTERNAL_REDIS_PASSWORD:-changeme}"]
volumes:
- ./vol/external_redis:/data
2 changes: 1 addition & 1 deletion server/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Password for the web interface. This key will be excluded from config
# before sending it to farm clients.
# ########## DO NOT FORGET TO CHANGE IT ##########
'SERVER_PASSWORD': '1234',
'SERVER_PASSWORD': os.getenv('SERVER_PASSWORD') or '1234',

# For all time-related operations
'TIMEZONE': 'Europe/Moscow',
Expand Down

0 comments on commit 09a21d3

Please sign in to comment.