To run the container from Docker Hub:
docker run -d \
--name vpn-api \
-p 3000:3005 \
-e PORT=3005 \
-e API_KEY=your_api_key_here \
-e AllowOrigins=* \
hidessh99/vpn-rest:latest
The container accepts the following environment variables:
| Variable | Description | Default |
|---|---|---|
| PORT | Port for the API to listen on | 3005 |
| API_KEY | API key for authentication | (required) |
| AllowOrigins | only access | (required) |
Create a docker-compose.yml file for easier deployment:
version: '3.8'
services:
vpn-api:
image: hidessh99/vpn-rest:latest
container_name: vpn-api
ports:
- "3005:3005"
environment:
- PORT=3005
- API_KEY=your_api_key_here
- AllowOrigins=*
restart: unless-stopped
Run with:
docker-compose up -d
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
docker pull hidessh99/vpn-rest:v1