Upgrade nodebb to latest version on docker

Technical Support
  • #1

    Hi,
    I follow the documentation and I install nodebb on docker but I install node v0.5.7. How can I upgrade do the lastest version of nodebb?

    Mário

  • #2

    @Mario-Pacheco by using alternative images maybe? Like the benlubar docker hub image.

  • #3

    hi @flex, thanks for your help
    It really helps, but now I have another problem, when I shutdown my app on docker i can't start it again, I have to rebuild it, did you know how can I fix this?

    Mario

  • #4

    @Mario-Pacheco said in Upgrade nodebb to latest version on docker:

    lly helps, but now I have another problem, when I shutdown my app on docker i can't start it again, I have to rebu

    When you do docker stop <my nodebb container> you cant restart the container with docker start <my nodebb container> ?

    Very strange because I can...

  • #5

    hi @flex i cant do "docker stop...", when I start my app for the first, I see the logs of app and the only way to exit its with CTRL + C, maybe that's why I cant restart my app.

    Mário

  • #6

    @Mario-Pacheco
    Can you paste your commands?
    I think it's because of a bad parameter like -t -i or something like that.

  • #7

    @flex
    to create my database I use redis
    docker run --name my-forum-redis -d -p 6379:6379 redis
    to create my nodebb app I use
    docker run --name my-forum-nodebb --link my-forum-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i benlubar/nodebb

  • #8

    @Mario-Pacheco
    docker run --name my-forum-nodebb --link my-forum-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i benlubar/nodebb

    -i is (according to docker run --help) :

    -i, --interactive Keep STDIN open even if not attached

    And -t:

    -t, --tty Allocate a pseudo-TTY

    I think the problem is -i. Just remove it. To see the same messages shown with -i parameter, just type docker logs <container name OR Id>

    Moreover, I am not shure but -p and -P are almost the same, you can use -p alone.

    -P, --publish-all Publish all exposed ports to random ports
    -p, --publish=[] Publish a container's port(s) to the host

  • #9

    @flex but if remove -i I can't write the host id, db adress, etc, etc

  • #10

    Indeed @Mario-Pacheco. But you can pass a config file previously written :

    --volume=/path/to/config.json:/usr/src/app/config.json

    The config file is like :

    {           
        "url": "https://forum.<your domain>.com",  
        "secret": "<secret password to database>",
        "database": "redis", 
        "port": 4567, 
        "redis": {
            "host": "redis",  
            "port": "6379", 
            "database": "0"
        }             
    } 
    

    I give you my command line to launch the forum :

    docker run -d \
    --name <name of the forum> \ 
    --link <name of redis container>:redis \ 
    --env 'VIRTUAL_HOST=forum.<your domain>.com' \                                  <= For the nginx reverse proxy container 
    --env 'LETSENCRYPT_HOST=forum.<your domain>.com' \                              <= For the letsencrypt container 
    --env 'LETSENCRYPT_EMAIL=<email>@<your domain>.com' \
    --volume=/Path/to/config.jso:/usr/src/app/config.json \                         <= For the config file
    --volume=/Path/to/uploads/files:/usr/src/app/public/uploads/files \             <= To keep your data if you remove the container
    --volume=/Path/to/uploads/profile:/usr/src/app/public/uploads/profile \         <= To keep your data if you remove the container
    --volume=/Path/to/datas:/data \                                                 <= To keep your data if you remove the container
    benlubar/nodebb 
    
  • #11

    @flex it works, thanks


Suggested Topics


  • 0 Votes
    5 Posts
    135 Views

  • Nodebb on my linux

    Technical Support
    0 Votes
    19 Posts
    1814 Views

  • 0 Votes
    5 Posts
    1773 Views

  • 0 Votes
    3 Posts
    929 Views

  • NodeBB Websocket Question

    Solved Technical Support
    1 Votes
    3 Posts
    1590 Views

| | | |