Commit 6ca60ebc by tdgiang

Add MONGO_URI and admin Basic Auth config

Add mongoUri and admin.{user,password} config keys to config/env/all.js
for Task 2 admin transaction management feature. Follows existing env var
pattern used for payment provider credentials. Default mongoUri points to
Docker service; admin credentials read from ADMIN_USER/ADMIN_PASSWORD env.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
parent 04e5624d
...@@ -42,3 +42,8 @@ ALEPAY_CHECKSUM_KEY= ...@@ -42,3 +42,8 @@ ALEPAY_CHECKSUM_KEY=
# Appota # Appota
APPOTA_API_KEY= APPOTA_API_KEY=
APPOTA_SECRET_KEY= APPOTA_SECRET_KEY=
# Admin transaction management
MONGO_URI=
ADMIN_USER=
ADMIN_PASSWORD=
...@@ -108,5 +108,10 @@ module.exports = { ...@@ -108,5 +108,10 @@ module.exports = {
cancel_url: "https://pg.cbotvietnam.com/appota/cancel", cancel_url: "https://pg.cbotvietnam.com/appota/cancel",
ipn_url: "https://pg.cbotvietnam.com/appota/ipn", ipn_url: "https://pg.cbotvietnam.com/appota/ipn",
}, },
mongoUri: process.env.MONGO_URI || "mongodb://mongo:27017/haiyen_admin",
admin: {
user: process.env.ADMIN_USER,
password: process.env.ADMIN_PASSWORD,
},
encrypt_key: process.env.ENCRYPT_KEY, encrypt_key: process.env.ENCRYPT_KEY,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment