bubuntux / nordvpn

NordVpn Docker Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Control the startup of the container

SpaWnOL68 opened this issue · comments

I am trying to connect my container nzbget through my VPN.
I have an issue as soon as i have to reboot my docker and so I can't access to my container nzbget anymore.

I tried to control the startup of the container with dockerize, docker-compose-wait.. but it didn't work..

Here's my docker-compose file

services:
 vpn:
    image: ghcr.io/bubuntux/nordvpn:latest
    container_name: vpn
    network_mode: bridge
    cap_add:
      - NET_ADMIN               
      - SYS_MODULE             
    devices:
      - /dev/net/tun           
    environment:              
      - USER=xxxxxxxxxxxxxx
      - PASS=xxxxxxxxxxxxxxxx
      - CONNECT_COUNTRY_CODE=xxxxxxxxxxxxxxx
      - TECHNOLOGY=NordLynx
      - NETWORK=192.168.2.0/24
    ports:
      - 6789:6789
      - 8081:8081
    restart: always

 nzbget:
    build: ./nzbget
    image: "nzbget:latest"
    network_mode: service:vpn
    container_name: nzbget
    volumes:
      - /srv/AppData/Nzbget:/config
      - /srv/Downloads:/downloads 
    environment:
      - WAIT_HOSTS=vpn:6789
      - WAIT_HOSTS_TIMEOUT=90
      - WAIT_SLEEP_INTERVAL=10
      - WAIT_HOST_CONNECT_TIMEOUT=10
    depends_on:
      - vpn
    command: sh -c "/wait"  

Log :
docker-compose-wait 2.7.2

Starting with configuration:

  • Hosts to be waiting for: [vpn:6789]
  • Timeout before failure: 90 seconds
  • TCP connection timeout before retry: 10 seconds
  • Sleeping time before checking for hosts availability: 0 seconds
  • Sleeping time once all hosts are available: 0 seconds
  • Sleeping time between retries: 10 seconds

Checking availability of vpn:6789
[INFO] nzbget 21.1 server-mode
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...
Host vpn:6789 not yet available...

Thanks.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.