diff --git a/deploy.env b/deploy.env index b9278181..c7251cd4 100644 --- a/deploy.env +++ b/deploy.env @@ -1,23 +1,39 @@ # This file is a template for docker compose deployment # Copy this file to .env and change the values as needed -# PostgreSQL default user password -POSTGRES_PASSWORD="changepassword" +# PostgreSQL Settings +POSTGRES_HOST=postgres +POSTGRES_USER=postgres +POSTGRES_PASSWORD=changepassword +POSTGRES_PORT=5432 +POSTGRES_DB=postgres + +# Supabase user settings +SUPABASE_USER=supabase_auth_admin +SUPABASE_PASSWORD=root + +# Redis Settings +REDIS_HOST=redis +REDIS_PORT=6379 + +# Gotrue Settings +GOTRUE_HOST=gotrue +GOTRUE_PORT=9999 # AppFlowy Cloud ## URL that connects to the gotrue docker container -APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999 +APPFLOWY_GOTRUE_BASE_URL=http://${GOTRUE_HOST}:${GOTRUE_PORT} ## URL that connects to the postgres docker container -APPFLOWY_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres +APPFLOWY_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} APPFLOWY_ACCESS_CONTROL=true APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000 APPFLOWY_DATABASE_MAX_CONNECTIONS=40 # admin frontend ## URL that connects to redis docker container -ADMIN_FRONTEND_REDIS_URL=redis://redis:6379 +ADMIN_FRONTEND_REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT} ## URL that connects to gotrue docker container -ADMIN_FRONTEND_GOTRUE_URL=http://gotrue:9999 +ADMIN_FRONTEND_GOTRUE_URL=http://${GOTRUE_HOST}:${GOTRUE_PORT} # authentication key, change this and keep the key safe and secret # self defined key, you can use any string @@ -56,7 +72,7 @@ API_EXTERNAL_URL=http://your-host # In docker environment, `postgres` is the hostname of the postgres service # GoTrue connect to postgres using this url -GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@postgres:5432/postgres +GOTRUE_DATABASE_URL=postgres://${SUPABASE_USER}:${SUPABASE_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} # Refer to this for details: https://github.com/AppFlowy-IO/AppFlowy-Cloud/blob/main/doc/AUTHENTICATION.md # Google OAuth2 @@ -130,26 +146,26 @@ NGINX_TLS_PORT=443 APPFLOWY_AI_OPENAI_API_KEY= APPFLOWY_AI_SERVER_PORT=5001 APPFLOWY_AI_SERVER_HOST=ai -APPFLOWY_AI_DATABASE_URL=postgresql+psycopg://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres +APPFLOWY_AI_DATABASE_URL=postgresql+psycopg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} APPFLOWY_LOCAL_AI_TEST_ENABLED=false # AppFlowy History APPFLOWY_GRPC_HISTORY_ADDRS=http://localhost:50051 -APPFLOWY_HISTORY_REDIS_URL=redis://redis:6379 -APPFLOWY_HISTORY_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres +APPFLOWY_HISTORY_REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT} +APPFLOWY_HISTORY_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} # AppFlowy Indexer APPFLOWY_INDEXER_ENABLED=true -APPFLOWY_INDEXER_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres -APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379 +APPFLOWY_INDEXER_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} +APPFLOWY_INDEXER_REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT} # AppFlowy Collaborate APPFLOWY_COLLABORATE_MULTI_THREAD=false APPFLOWY_COLLABORATE_REMOVE_BATCH_SIZE=100 # AppFlowy Worker -APPFLOWY_WORKER_REDIS_URL=redis://redis:6379 -APPFLOWY_WORKER_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres +APPFLOWY_WORKER_REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT} +APPFLOWY_WORKER_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} # AppFlowy Web APPFLOWY_WEB_URL=http://localhost:3000