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

Issue deploying with Portainer #351

Closed
keichitokuna opened this issue Feb 11, 2024 · 2 comments
Closed

Issue deploying with Portainer #351

keichitokuna opened this issue Feb 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@keichitokuna
Copy link

Hello,

I love and use cobalt.tools a lot, and wanted to give a try self-hosted my instance.

bug description

I have a UNRAID server, where I have installed Portainer.
When I deploy, everything goes fine, but I can't access the service.

reproduction steps
Inside Portainer, select Stacks > Add stack.

Use this docker compose (Portainer use port 9000, so i use 13000/13001):

version: '3.5'

services:
    cobalt-api:
        image: ghcr.io/wukko/cobalt:7
        restart: unless-stopped
        container_name: cobalt-api

        init: true

        # if container doesn't run detached on your machine, uncomment the next line:
        #tty: true

        ports:
            - 13000:13000/tcp
            # if you're using a reverse proxy, uncomment the next line:
            #- 127.0.0.1:9000:9000

        environment:
            # replace apiURL with your instance's target url in same format
            - apiURL=http://192.168.0.220:13000/
            # replace apiName with your instance's distinctive name
            - apiName=eu-fr
            # if you want to use cookies when fetching data from services, uncomment the next line
            #- cookiePath=/cookies.json
            # see cookies_example.json for example file.
        labels:
            - com.centurylinklabs.watchtower.scope=cobalt

        # if you want to use cookies when fetching data from services, uncomment volumes and next line
        #volumes:
            #- ./cookies.json:/cookies.json

    cobalt-web:
        image: ghcr.io/wukko/cobalt:7
        restart: unless-stopped
        container_name: cobalt-web

        init: true

        # if container doesn't run detached on your machine, uncomment the next line:
        #tty: true

        ports:
            - 13001:13001/tcp
            # if you're using a reverse proxy, uncomment the next line:
            #- 127.0.0.1:9001:9001

        environment:
            # replace webURL with your instance's target url in same format
            - webURL=http://192.168.0.220:13001/
            # replace apiURL with preferred api instance url
            - apiURL=http://192.168.0.220:13000/

        labels:
            - com.centurylinklabs.watchtower.scope=cobalt

    # update the cobalt image automatically with watchtower
    watchtower:
        image: ghcr.io/containrrr/watchtower
        restart: unless-stopped
        command: --cleanup --scope cobalt --interval 900
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock

Submit the form, and the stack is created without issue.
Capture d’écran 2024-02-11 à 18 09 22

In the Containers view, i now have three new containers :
Capture d’écran 2024-02-11 à 18 09 39

I added the three cobalt containers to the network i use for my others services :
Capture d’écran 2024-02-11 à 18 10 41

When i go to 192.168.0.220:13001 (my Unraid server ip + the port for the Web), i can't reach the site :
Capture d’écran 2024-02-11 à 18 11 49

Strange thing, i can see in the log, for the api :

cobalt API v.7.10.2-3356966 (current)
Start time: Sun, 11 Feb 2024 17:02:20 GMT (1707670940307)
URL: http://192.168.0.220:13000/
Port: 9000

The port seems to be 9000 (which is the one used by Portainer)

And the log for the web :

cobalt WEB v.7.10.2-3356966 (current)
Start time: Sun, 11 Feb 2024 17:02:19 GMT (1707670939498)
URL: http://192.168.0.220:13001/
Port: 9001

Port 9001 is used by mosquitto server.

platform

  • OS: Unraid 6.12.6 + Portainer CE 2.19.4
  • browser: firefox
  • version: 122

additional context
This is the first time i use docker compose with Portainer, so it can be something i made wrong.
I also deploy cobalt using github/npm on my Macbook, and it is working fine, but i am more used to.

Thanks for your help, and sorry if it is not an issue, juste a mistake made by me.

K.

@keichitokuna keichitokuna added the bug Something isn't working label Feb 11, 2024
@dumbmoron
Copy link
Member

dumbmoron commented Feb 11, 2024

hi, the default ports are 9000/9001, so you either need to specify an environment variable like apiPort=13000 (similarly webPort for web), or change the righthand side of the ports item to say 9000 and 9001 (like 13000:9000/tcp and 13001:9001/tcp)

@keichitokuna
Copy link
Author

Hello,

With 13000:9000/tcp and 13001:9001/tcp, everything is working now.

Thank you!

K.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants