diff --git a/src/Components/.env_example b/src/Components/.env_example index d24bbcfa1..fdfc0b6cf 100644 --- a/src/Components/.env_example +++ b/src/Components/.env_example @@ -2,8 +2,25 @@ # === Stripe Payment Gateway === STRIPE_PRIVATE_KEY=sk_test_your_stripe_key_here -# === MongoDB Connection === -# Replace mongodb+srv://:@.mongodb.net/echoDB with "mongodb://modelUser:EchoNetAccess2023@ts-mongodb-cont:27017/EchoNet" -MONGODB_URI=mongodb+srv://:@.mongodb.net/echoDB +# === MongoDB === +DB_HOST=ts-mongodb-cont +DB_NAME=EchoNet +DB_USER=modelUser +DB_USER_PASS=EchoNetAccess2023 +DB_ROOT_USER=root +DB_ROOT_USER_PASS=root_password -# Please go through "Environment Setup & Stripe Integration Guide" uploaded in the Project Echo team files. \ No newline at end of file +# === MongoDB URI === +MONGODB_URI=mongodb://modelUser:EchoNetAccess2023@ts-mongodb-cont:27017/EchoNet +USER_MONGODB_URI=mongodb://root:root_password@ts-mongodb-cont:27017/UserSample?authSource=admin + +# === Redis === +NODE_ENV=development +REDIS_HOST=echo-redis + +# === API === +API_HOST=ts-api-cont + +# === Mail === +MAIL_STARTTLS=true +MAIL_SSL_TLS=false \ No newline at end of file diff --git a/src/Components/HMI/ui/public/login.html b/src/Components/HMI/ui/public/login.html index c30db97cf..6a7beeced 100644 --- a/src/Components/HMI/ui/public/login.html +++ b/src/Components/HMI/ui/public/login.html @@ -104,7 +104,8 @@ -
+
@@ -423,4 +424,4 @@ }); - + \ No newline at end of file diff --git a/src/Components/docker-compose.yml b/src/Components/docker-compose.yml index e56098976..5cfe9b2a6 100644 --- a/src/Components/docker-compose.yml +++ b/src/Components/docker-compose.yml @@ -11,6 +11,8 @@ services: image: ts-echo-model container_name: ts-echo-model-cont command: --model_config_file=/models/models.config + env_file: + - .env networks: - echo-net ports: @@ -26,6 +28,8 @@ services: dockerfile: Engine.Dockerfile image: ts-echo-engine container_name: ts-echo-engine-cont + env_file: + - .env networks: - echo-net volumes: @@ -40,8 +44,8 @@ services: dockerfile: HMI.Dockerfile image: ts-echo-hmi container_name: ts-echo-hmi-cont - # env_file: - # - .env + env_file: + - .env networks: - echo-net volumes: @@ -55,9 +59,7 @@ services: - echo-redis stdin_open: true tty: true - environment: - - NODE_ENV=development - - API_HOST=ts-api-cont + echo_mqtt: @@ -105,9 +107,8 @@ services: - ./API:/app # Mount the API's src directory to /app in the container - credentials_volume:/root/.config/gcloud/ - weather_data:/app/weather_data # Add a volume for weather data - environment: - MAIL_STARTTLS: "true" - MAIL_SSL_TLS: "false" + env_file: + - .env stdin_open: false @@ -120,11 +121,13 @@ services: restart: always ports: - 8888:8081 + env_file: + - .env environment: - ME_CONFIG_MONGODB_SERVER: ts-mongodb-cont + ME_CONFIG_MONGODB_SERVER: ${DB_HOST} ME_CONFIG_MONGODB_ENABLE_ADMIN: "true" - ME_CONFIG_MONGODB_ADMINUSERNAME: root - ME_CONFIG_MONGODB_ADMINPASSWORD: root_password + ME_CONFIG_MONGODB_ADMINUSERNAME: ${DB_ROOT_USER} + ME_CONFIG_MONGODB_ADMINPASSWORD: ${DB_ROOT_USER_PASS} depends_on: - echo_store networks: @@ -139,10 +142,12 @@ services: container_name: ts-mongodb-cont networks: - echo-net + env_file: + - .env environment: - MONGO_INITDB_ROOT_USERNAME: root - MONGO_INITDB_ROOT_PASSWORD: root_password - MONGO_INITDB_DATABASE: EchoNet + MONGO_INITDB_ROOT_USERNAME: ${DB_ROOT_USER} + MONGO_INITDB_ROOT_PASSWORD: ${DB_ROOT_USER_PASS} + MONGO_INITDB_DATABASE: ${DB_NAME} ports: - "27017:27017" volumes: