Files
NodeBB/docker-compose.yml
Opliko f4f0eb30dc Small docker improvements and fixes (#12335)
* feat: disable uneecessary npm features

disables npm audit, fund and update-notifier for a few second startup speedup

* fix: make default actually defaults not forced values

* feat: upgrade on container changes

* feat: support changing build verb

* fix: use local volumes instead of bind mounts

* fix: save just the hash without any unexpected whitespace

* feat: use run with mount instead of copying for cross-platfomr builds

* ci: try with minimal cache

* ci: don't fetch all branches

* feat: bsic support for other package managers via PACKAGE_MANAGER env var

* refactor: better structured entrypoint

Co-authored-by: NavyStack <137406386+NavyStack@users.noreply.github.com>

* ci: properly cache the node_modules mount

* fix: syntax error

* refactor: fine tune docker-related files

* ci: docker image taging (time, latest)

* fix: remove the trailing slash for correct directory path

* docker: todo- use environment variables to create files

* docker: fix permissions

* docker: fix permissions

* docker: fix stage

* feat: auto-upgrade on package.json changes

* fix: don't profile-gate postgres

---------

Co-authored-by: NavyStack <137406386+NavyStack@users.noreply.github.com>
Co-authored-by: NavyStack <navystack@askfront.com>
2024-05-10 11:10:42 -04:00

72 lines
1.7 KiB
YAML

version: '3.8'
services:
nodebb:
build: .
# image: ghcr.io/nodebb/nodebb:latest
restart: unless-stopped
ports:
- '4567:4567' # comment this out if you don't want to expose NodeBB to the host, or change the first number to any port you want
volumes:
- nodebb-build:/usr/src/app/build
- nodebb-uploads:/usr/src/app/public/uploads
- nodebb-config:/opt/config
- ./install/docker/setup.json:/usr/src/app/setup.json
mongo:
image: 'mongo:7-jammy'
restart: unless-stopped
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: nodebb
MONGO_INITDB_ROOT_PASSWORD: nodebb
MONGO_INITDB_DATABASE: nodebb
volumes:
- mongo-data:/data/db
- ./install/docker/mongodb-user-init.js:/docker-entrypoint-initdb.d/user-init.js
redis:
image: redis:7.2.3-alpine
restart: unless-stopped
command: ['redis-server', '--appendonly', 'yes', '--loglevel', 'warning']
# command: ['redis-server', '--save', '60', '1', '--loglevel', 'warning'] # uncomment if you want to use snapshotting instead of AOF
volumes:
- redis-data:/data
volumes:
mongo-data:
driver: local
driver_opts:
o: bind
type: none
device: ./.docker/database/mongo/data
redis-data:
driver: local
driver_opts:
o: bind
type: none
device: ./.docker/database/redis
nodebb-build:
driver: local
driver_opts:
o: bind
type: none
device: ./.docker/build
nodebb-uploads:
driver: local
driver_opts:
o: bind
type: none
device: ./.docker/public/uploads
nodebb-config:
driver: local
driver_opts:
o: bind
type: none
device: ./.docker/config