diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index 97a51a725904..a4d421e9ab49 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -21,7 +21,7 @@ services: - "5011:8080" restart: always environment: - STORAGE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + STORAGE_URI: redis://:${REDIS_PASSWORD}@redis:6379 STORAGE_TTL: 2592000000 excalidraw-room: @@ -30,22 +30,13 @@ services: ports: - "5012:80" - postgres: - image: postgres:12-alpine - # Pass config parameters to the postgres server. - # Find more information below when you need to generate the ssl-relevant file your self - # command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key - environment: - PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_DB: ${POSTGRES_DB:-excalidraw-prod} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_PORT: ${POSTGRES_PORT:-5432} - POSTGRES_USER: ${POSTGRES_USER} + redis: + image: redis + command: redis-server --requirepass ${REDIS_PASSWORD} + restart: always volumes: - - postgres_data:/var/lib/postgresql/data/pgdata - ports: - - "5432:5432" + - redis_data:/data volumes: notused: - postgres_data: + redis_data: diff --git a/docker-compose.yml b/docker-compose.yml index 440cc381b14d..69824386c923 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,33 +20,23 @@ services: - ./:/opt/node_app/ excalidraw-storage-backend: - build: ghcr.io/kitsteam/excalidraw-storage-backend:master + build: https://github.com/kitsteam/excalidraw-storage-backend.git#main ports: - "8080:8080" environment: - STORAGE_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + STORAGE_URI: redis://:${REDIS_PASSWORD}@redis:6379 STORAGE_TTL: 2592000000 excalidraw-room: image: excalidraw/excalidraw-room ports: - "5001:80" - - postgres: - image: postgres:12-alpine - # Pass config parameters to the postgres server. - # Find more information below when you need to generate the ssl-relevant file your self - # command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key - environment: - PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_DB: ${POSTGRES_DB:-excalidraw-dev} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_PORT: ${POSTGRES_PORT:-5432} - POSTGRES_USER: ${POSTGRES_USER} + + redis: + image: redis + command: redis-server --requirepass ${REDIS_PASSWORD} volumes: - - postgres_data:/var/lib/postgresql/data/pgdata - ports: - - "5432:5432" + - redis_data:/data volumes: + redis_data: node_modules: - postgres_data: