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:
Opliko
2024-05-10 17:10:42 +02:00
committed by GitHub
parent febeede50b
commit f4f0eb30dc
19 changed files with 542 additions and 148 deletions

View File

@@ -13,34 +13,34 @@ postgresModule.questions = [
{
name: 'postgres:host',
description: 'Host IP or address of your PostgreSQL instance',
default: nconf.get('postgres:host') || '127.0.0.1',
default: nconf.get('postgres:host') || nconf.get('defaults:postgres:host') || '127.0.0.1',
},
{
name: 'postgres:port',
description: 'Host port of your PostgreSQL instance',
default: nconf.get('postgres:port') || 5432,
default: nconf.get('postgres:port') || nconf.get('defaults:postgres:port') || 5432,
},
{
name: 'postgres:username',
description: 'PostgreSQL username',
default: nconf.get('postgres:username') || '',
default: nconf.get('postgres:username') || nconf.get('defaults:postgres:username') || '',
},
{
name: 'postgres:password',
description: 'Password of your PostgreSQL database',
hidden: true,
default: nconf.get('postgres:password') || '',
default: nconf.get('postgres:password') || nconf.get('defaults:postgres:password') || '',
before: function (value) { value = value || nconf.get('postgres:password') || ''; return value; },
},
{
name: 'postgres:database',
description: 'PostgreSQL database name',
default: nconf.get('postgres:database') || 'nodebb',
default: nconf.get('postgres:database') || nconf.get('defaults:postgres:database') || 'nodebb',
},
{
name: 'postgres:ssl',
description: 'Enable SSL for PostgreSQL database access',
default: nconf.get('postgres:ssl') || false,
default: nconf.get('postgres:ssl') || nconf.get('defaults:postgres:ssl') || false,
},
];