This project provides a reverse proxy solution for using multiple backend services on the IXON SecureEdge Pro gateway via a single Web Access entry point. It includes an NGINX reverse proxy and two backend services, all containerized and ready for deployment.
- Ensure your environment is properly set up by following this guide: Running custom Docker applications on the SecureEdge Pro
- Required tools:
- Docker and Docker Buildx
jq
for JSON processinggettext
package (forenvsubst
command)- Access to IXON SecureEdge Pro gateway
The application consists of three main components:
-
NGINX Reverse Proxy (
nginx-proxy
)- Serves as the main entry point (port 8000)
- Routes traffic to appropriate backend services
- Configurable through environment variables
-
Backend Service 1 (
backend-service1
)- Runs on port 8081
- Includes persistent data storage
-
Backend Service 2 (
backend-service2
)- Runs on port 8082
- Includes persistent data storage
All services run in their own containers and are connected through the machine-builder
network.
-
Copy
.env-example
to.env
and configure your environment variables:cp .env-example .env
-
The
container_configs.json
file contains the configuration for all containers, including:- Container names and image tags
- Port mappings
- Volume mounts
- Environment variables
- Network settings
To enable remote access to your reverse proxy and backend services through IXON Cloud:
-
Add HTTP WebAccess in Fleet Manager
- Navigate to Fleet Manager > Devices and select your device
- Click the add icon in the Services section
- Select "HTTP server"
- Configure the following settings:
- Name: Choose a descriptive name (e.g., "Reverse Proxy")
- Service group: (Optional) Group related services
- Protocol: HTTP
- Port: 8000 (default port for the reverse proxy)
- Default landing page: "/"
- Access Category: Configure who can access this service
- Show in device overview: Enable for easy access
-
Push Configuration
- After adding the HTTP WebAccess, click "Push config to device"
- Note: The device may temporarily disconnect while applying new settings
-
Accessing the Services
- Go to IXON Portal > Devices
- Find your device and click the HTTP WebAccess button
- The reverse proxy will route requests to the appropriate backend service based on the URL path
Note: All communication between your computer and the device will be secure, regardless of using HTTP internally.
-
Prepare the Environment
# Make the deployment script executable chmod +x deploy_edge_services.sh
-
Deploy the Services
./deploy_edge_services.sh
This script will:
- Authenticate with the SecureEdge Pro
- Set up Docker Buildx
- Build and push container images
- Deploy and start all services
-
Verify Deployment
- Access the NGINX proxy at
http://<your-gateway-ip>:8000
- Backend services will be available at their respective endpoints
- Access the NGINX proxy at
.
├── nginx-proxy/ # NGINX reverse proxy configuration
├── backend-service1/ # First backend service
├── backend-service2/ # Second backend service
├── scripts/ # Deployment and utility scripts
├── container_configs.json # Container configurations
├── deploy_edge_services.sh # Main deployment script
└── .env-example # Example environment variables
-
Container Issues
- Check container logs using Docker commands
- Verify network connectivity between containers
- Ensure all required ports are accessible
-
Deployment Issues
- Verify your
.env
configuration - Check SecureEdge Pro connectivity
- Ensure all required tools are installed
- Verify your
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
See the LICENSE.md file for details.