version: "3.8"

services:

  nodebb:
    image: vimagick/nodebb
    init: true
    ports:
      - "4567:4567"
    volumes:
      - nodebb_config:/opt/nodebb/config
      - nodebb_build:/opt/nodebb/build
      - nodebb_uploads:/opt/nodebb/public/uploads
      # /opt/nodebb/node_modules
    environment:
      - url=http://localhost:4567/
      - database=redis
      - redis__host=redis
      - redis__database=0
    depends_on:
      - redis
    restart: unless-stopped

  redis:
    image: redis:6-alpine
    volumes:
      - ./data:/data
    restart: unless-stopped

volumes:
  nodebb_config:
  nodebb_build:
  nodebb_uploads:
