Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exanmple NPM config and compose #59

Open
GamerClassN7 opened this issue Sep 4, 2024 · 5 comments
Open

Exanmple NPM config and compose #59

GamerClassN7 opened this issue Sep 4, 2024 · 5 comments
Labels
question Further information is requested

Comments

@GamerClassN7
Copy link

hello,
i am trying to setup ContainerNursery but i was not able to setup it correctly with NPM can anyone help me ?

My configs are following and only think i get is 502 Bad Gateway.

version: "3.8"
services:
  app:
    image: jc21/nginx-proxy-manager:latest
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - 80:80 # Public HTTP Port
      - 443:443 # Public HTTPS Port
      - 81:81 # Admin Web Port
      # Add any other Stream port you want to expose
      # - '21:21' # FTP
      # Uncomment the next line if you uncomment anything in the section
      # environment:
      # Uncomment this if you want to change the location of
      # the SQLite DB file within the container
      # DB_SQLITE_FILE: "/data/database.sqlite"

      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'

    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
networks:
  app_default:
    external: true
version: "3.3"
services:
  containernursery:
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./config:/usr/src/app/config
    image: ghcr.io/itsecholot/containernursery:latest
networks:
  app_default:
    external: true
proxyListeningPort: 80
proxyHosts:
  - domain: dev.localhost
    containerName: dozzle-dozzle-1
    proxyHost: localhost
    proxyPort: 8080
    timeoutSeconds: 20
version: "3.8"
services:
  dozzle:
    ports:
      - 8080:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    image: amir20/dozzle:latest
networks:
  app_default:
    external: true

Can anyone try to point any issues in docker files or in config, since i tryed everything i could, without any sucess
thank you

@ItsEcholot
Copy link
Owner

We need more information from you here, please set the CN_LOG_LEVEL environment variable to debug for the ContainerNursery container and check the logs for more information about what's going wrong here.

@ItsEcholot ItsEcholot added the question Further information is requested label Oct 29, 2024
@dragosdmc
Copy link

Same configuration here and I'm able to get CN to stop said container, but unable to start it. Did you find amy fix for this?

I enabled debug as well and I could clearly see all the steps involved in stopping, but after that nothing else is written in the logs when accessing the domain address.

@ItsEcholot
Copy link
Owner

Same configuration here and I'm able to get CN to stop said container, but unable to start it. Did you find amy fix for this?

I enabled debug as well and I could clearly see all the steps involved in stopping, but after that nothing else is written in the logs when accessing the domain address.

That usually means that the traffic isn’t routed through CN in the first place. Thus CN doesn’t know when you want to access the container and can’t start it.

@dragosdmc
Copy link

dragosdmc commented Nov 6, 2024

Figured as much, but I can't find the mistake in the configuration:

version: "3.8"
services:
  nginx:
    image: jc21/nginx-proxy-manager:latest
    restart: unless-stopped
    ports:
      - 80:80
      - 443:443
      - 81:81
services:
  prowlarr:
    image: lscr.io/linuxserver/prowlarr:latest
    container_name: prowlarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /srv/dockerdata/prowlarr:/config
    ports:
      - 9001:9696
    restart: unless-stopped

Tried using CN both with a bridge between containers and with the local IP as well, but same result.

root@docker:/srv/dockerdata/containernursery$ cat config.yml 
proxyListeningPort: 80
proxyHosts:
  - domain: prowlarr.domain.com
    containerName: prowlarr
    displayName: Prowlarr
    proxyHost: prowlarr
    proxyPort: 9696
    timeoutSeconds: 15
    stopOnTimeoutIfCpuUsageBelow: 50
    proxyUseHttps: false
    proxyUseCustomMethod: GET
root@docker:/srv/dockerdata/containernursery$ cat config.yml 
proxyListeningPort: 80
proxyHosts:
  - domain: prowlarr.domain.com
    containerName: prowlarr
    displayName: Prowlarr
    proxyHost: 192.168.0.50
    proxyPort: 9001
    timeoutSeconds: 15
    stopOnTimeoutIfCpuUsageBelow: 50
    proxyUseHttps: false
    proxyUseCustomMethod: GET

Am I doing something wrong here?

@dragosdmc
Copy link

here?

Solved by redeploying the container using the host network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants