
๐ณ MyZubsterGateway: Production-Ready Deployment & New Features
We've just completed a major update to the MyZubsterGateway repository, focusing on making the project easier to deploy, more secure, and ready for production use. Here's what changed.
๐ What's New?
- Docker Support Added
We've fully containerized the gateway with Docker and Docker Compose. This means you can now deploy the entire gateway stack (including MongoDB) with a single command.
New Files:
Dockerfile โ Multi-stage build optimized for Node.js 20
docker-compose.yml โ Defines and runs the gateway + MongoDB together
.dockerignore โ Excludes sensitive files from the Docker image
Benefits:
โ
Consistent environment across all deployments
โ
One-command setup: docker compose up -d
โ
Simplified scaling and maintenance
โ
Easy integration with other services (marketplace, AI, Monero)
Example docker-compose.yml snippet:
yaml
services:
mongodb:
image: mongo:7-jammy
# ... config
gateway:
build: .
ports:
- "3000:3000"
environment:
- MONGO_URI=mongodb://${MONGO_USER:-admin}:${MONGO_PASSWORD:-securepassword}@mongodb:27017/myzubster?authSource=admin
# ... config
- Environment Configuration
We've completely reworked the environment variable management.
New File: .env.example โ A template with all required variables
Variable Purpose
MONGO_USER / MONGO_PASSWORD MongoDB authentication
MONERO_RPC_URL Monero node endpoint (now supports public nodes)
MONERO_WALLET_ADDRESS / MONERO_WALLET_PASSWORD Monero wallet for payments
JWT_SECRET JWT signing key (MUST be changed)
API_KEY API authentication key
MARKETPLACE_WEBHOOK_URL Webhook endpoint for the marketplace
Security Note: The .env file is excluded from Git via .gitignore to prevent accidental exposure of secrets.
- New API Endpoint: /api/users
Added a new route to manage users:
javascript
// routes/users.js
router.get('/', (req, res) => {
res.json({ users: [] });
});
router.post('/', (req, res) => {
// Create a new user
});
This endpoint is now registered in server.js and ready for future expansion.
- Updated server.js
The main server file has been cleaned up and restructured:
Removed duplicate declarations
Improved error handling
Better MongoDB connection management
All routes are now properly registered
๐ฆ How to Deploy
Step 1: Clone the Repository
bash
git clone https://github.com/DanielIoni-creator/MyZubsterGateway.git
cd MyZubsterGateway
Step 2: Configure Environment
bash
cp .env.example .env
nano .env # Add your credentials
Step 3: Start the Gateway
bash
docker compose up -d
Step 4: Verify
bash
curl http://localhost:3000/api/health
Expected output: {"status":"ok","timestamp":"..."}
๐ง Monero Integration
The gateway now supports two modes for Monero:
Option 1: Public Node (Default)
env
MONERO_RPC_URL=http://node.moneroworld.com:18081
Option 2: Local Node
env
MONERO_RPC_URL=http://monero:18081
If you want to run a local Monero node:
bash
wget https://downloads.getmonero.org/cli/linux64
tar -xvf linux64
cd monero-x86_64-linux-gnu-*
./monerod --rpc-bind-ip=0.0.0.0 --rpc-bind-port=18081 --restricted-rpc --confirm-external-bind --non-interactive
๐ Security Improvements
Non-root user inside the container
Sensitive files excluded from the image via .dockerignore
Environment variables never hard-coded
JWT_SECRET must be generated per deployment
Monero RPC uses authentication
๐ What Was Removed
โ ..env.swp (temporary swap file)
โ Obsolete version attribute from docker-compose.yml
โ Duplicate code in server.js
โ Hard-coded configuration values
๐ ๏ธ Development vs Production
Branch Use Case
dev Active development, new features
main Stable, production-ready releases
All changes have been merged from dev into main.
๐งช Test the New Setup
bash
Health check
curl http://localhost:3000/api/health
Users endpoint
curl http://localhost:3000/api/users
Check Docker logs
docker compose logs -f gateway
๐ Conclusion
This update transforms MyZubsterGateway from a standalone Node.js application into a fully containerized, production-ready service. It's now easier to deploy, more secure, and prepared for future growth.
Next Steps:
Connect the marketplace
Deploy the mobile app
Integrate the NFT template for Tari
Enable the security bot
๐ Connect with Me
Follow the development of MyZubster and connect with me on social media:
Platform Handle / Link
DEV.to (Blog) @danielioni
GitHub DanielIoni-creator
X (Twitter) @myzubster
TikTok @h4x0r_23
LinkedIn Daniel Ioni
YouTube Coming soon
Stay updated on the journey! ๐
๐ Project Links
Project Repository
MyZubsterGateway DanielIoni-creator/MyZubsterGateway
MyZubster-Marketplace DanielIoni-creator/MyZubster-Marketplace
MyZubster-App DanielIoni-creator/MyZubster-App
Tari NFT Template DanielIoni-creator/tari-nft-template
MyZubster (Ecosystem) DanielIoni-creator/myzubster
๐ Contribute
If you'd like to contribute, please:
Fork the repository
Create a feature branch (feat/amazing-feature)
Submit a Pull Request to the dev branch
Built with โค๏ธ for privacy, freedom, and decentralization.
Author: Daniel Ioni
Project: MyZubster โ The Decentralized Marketplace
Top comments (0)