mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 07:10:30 +01:00
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>
This commit is contained in:
68
docker-compose-pgsql.yml
Normal file
68
docker-compose-pgsql.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
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
|
||||
|
||||
postgres:
|
||||
image: postgres:16.1-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: nodebb
|
||||
POSTGRES_PASSWORD: nodebb
|
||||
POSTGRES_DB: nodebb
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
|
||||
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:
|
||||
postgres-data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
o: bind
|
||||
type: none
|
||||
device: ./.docker/database/postgresql/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
|
||||
Reference in New Issue
Block a user