diff --git a/deploy/template/docker-compose.yml.sh b/deploy/template/docker-compose.yml.sh index 35053ca08f..13b763f5fb 100644 --- a/deploy/template/docker-compose.yml.sh +++ b/deploy/template/docker-compose.yml.sh @@ -61,10 +61,8 @@ services: image: mongo:4.4.6 expose: - "27017" - environment: - - MONGO_INITDB_DATABASE=$mongo_database - - MONGO_INITDB_ROOT_USERNAME=$mongo_root_user - - MONGO_INITDB_ROOT_PASSWORD=$mongo_root_password + env_file: + - ./docker.env volumes: - ./data/mongo/db:/data/db - ./data/mongo/init.js:/docker-entrypoint-initdb.d/init.js:ro diff --git a/deploy/template/docker.env.sh b/deploy/template/docker.env.sh index d1561b8902..8de001c485 100644 --- a/deploy/template/docker.env.sh +++ b/deploy/template/docker.env.sh @@ -40,7 +40,10 @@ APPSMITH_MAIL_ENABLED=false # ******** Database ************* APPSMITH_REDIS_URL=redis://redis:6379 -APPSMITH_MONGODB_URI=mongodb://$encoded_mongo_root_user:$encoded_mongo_root_password@$mongo_host/appsmith?retryWrites=true +APPSMITH_MONGODB_URI=mongodb://$encoded_mongo_root_user:$encoded_mongo_root_password@$mongo_host/$mongo_database?retryWrites=true +MONGO_INITDB_DATABASE=$mongo_database +MONGO_INITDB_ROOT_USERNAME=$mongo_root_user +MONGO_INITDB_ROOT_PASSWORD=$mongo_root_password # ******************************* # *** EE Specific Config ********