@pitaj You are right, git checkout version and nodejs downgrade did the trick.
Thanks a lot!
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
@Mario-Pacheco by using alternative images maybe? Like the benlubar docker hub image.
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
@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...
@Mario-Pacheco
Can you paste your commands?
I think it's because of a bad parameter like -t -i
or something like that.
@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
@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
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