Hi,
I tried to run nodebb/docker with a redis db as swarm / stack.
compose:
version: '3.7'
services:
nodebb:
image: nodebb/docker
networks:
webproxy:
redis:
labels:
# caddy swarm reverse proxy with lets encrypt
caddy.address: "nodebb.example.com"
caddy.targetport: '4567'
caddy.log: '/ stdout "[{host}] {remote} - {user} [{when}] \"{method} {uri} {proto}\" {status} {size}"'
caddy.errors: "stdout"
stdin_open: true
tty: true
volumes:
- build:/usr/src/app/build
- uploads:/usr/src/app/public/uploads
deploy:
restart_policy:
condition: any
delay: 10s
max_attempts: 5
window: 60s
redis:
image: redis:5.0.7
networks:
redis:
volumes:
- data:/data
command: 'redis-server --appendonly yes'
networks:
webproxy:
external:
name: proxy_webproxy
redis:
volumes:
data:
build:
uploads:
After setup is finished I click the "Launch" button and that kills the container:
2019-12-28T11:54:49.017Z [19] - info: [build] Asset compilation successful. Completed in 140.239sec.
NodeBB Setup Completed. Run "./nodebb start" to manually start your NodeBB server.
Starting NodeBB
"./nodebb stop" to stop the NodeBB server
"./nodebb log" to view server output
"./nodebb restart" to restart NodeBB
Would be no problem because of swarm restart_policy a new container should start...
But after that I get the installer again instead of the installed nodebb forum.
So something seems to be wrong. Redis DB is empty and nodebb volumes contains data.
See below:
rancher:/var/lib/docker/volumes# ls -lh nodebb_*/_data/
nodebb_build/_data/:
total 12
-rw-r--r-- 1 root root 11 Dec 28 11:54 cache-buster
drwxr-xr-x 2 root root 4.0K Dec 28 11:33 export
drwxr-xr-x 7 root root 4.0K Dec 28 11:53 public
nodebb_data/_data/:
total 132
-rw-r--r-- 1 999 ping 129.8K Dec 28 11:52 appendonly.aof
nodebb_uploads/_data/:
total 20
drwxr-xr-x 2 root root 4.0K Dec 28 11:25 category
drwxr-xr-x 2 root root 4.0K Dec 28 11:25 files
drwxr-xr-x 2 root root 4.0K Dec 28 11:25 profile
drwxr-xr-x 2 root root 4.0K Dec 28 11:25 sounds
So how to install with persistent data?
Why no redis data is written to the volume?
I'm new with redis, but it should work without password because I haven't set an password?
Redis connect works fine from nodebb to redis container:
root@a8dd26787f8f:/usr/src/app# telnet redis 6379
Trying 10.0.19.2...
Connected to redis.
Escape character is '^]'.
quit
+OK
Connection closed by foreign host.