HUB
Sign inSign up
vpn-rest logo

hidessh99/vpn-rest

By hidessh99

•Updated over 1 year ago

rest vpn to only package hidessh

Image
0

163

hidessh99/vpn-rest repository overview

⁠Running the Container from Docker Hub

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

⁠Environment Variables

The container accepts the following environment variables:

VariableDescriptionDefault
PORTPort for the API to listen on3005
API_KEYAPI key for authentication(required)
AllowOriginsonly access(required)

⁠Docker Compose (Optional)

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

⁠Best Practices

  1. Security: Always use a non-root user in production containers
  2. Multi-stage builds: Use multi-stage builds to reduce image size
  3. Tagging: Use semantic versioning for your Docker images
  4. Health checks: Add health checks to your Dockerfile:
    HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
      CMD curl -f http://localhost:3000/health || exit 1
    

⁠Troubleshooting

⁠Common Issues
  1. Permission denied errors: Ensure the binary is executable
  2. Port already in use: Change the port mapping in the docker run command
  3. Missing dependencies: Make sure all required shell commands are available
Tag summary
Recent tags
Content type
Image
Digest
sha256:19c93e51d…
Size
13.2 MB
Last updated
over 1 year ago
docker pull hidessh99/vpn-rest:v1