Commit Graph

67 Commits

Author SHA1 Message Date
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
Opliko
7f3a9968ef feat: docker improvements (#12031)
* use yarn and debian slim build

* feat: update Dockerfile to use multistage builds

* Create main.yml

* remove some useless things from docker context and assume yarn by default

* remove all dotfiles in docker context

* no need for extra build tools, complain to the module author if there is no alpine build

(cherry picked from commit 90516a3c8399e74c38be7115edb39411ba0d86b9)

* specify the config file location instead of creating it

(cherry picked from commit 38e4295d70682f1049fe671ade96eeccd669d908)

* set explicit config path

(cherry picked from commit 8dcc6f249d099cb8939a95511ec13702491958bc)

* fix docker-compose example to use the exposed volumes

* dockerfile: upgrade alpine to 3.16

* dockerignore: add more ignorable entries

* docker-compose: change the way the docker startup process works

* install: pass config path to child process as well

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* setup: move config file resolution up before setup

This fixes issue with different config file location, which will otherwise default on 'config.json', which means the config save won't save to the file we specified

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-entrypoint: don't fix CONFIG_DIR location but fix default location

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-entrypoint: handle missing config file logic

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* README: add simple notice on how to use it

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* add missing semicolons

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-compose: remove multi override, use one big profile instead

However, Docker Compose doesn't support profile-based dependency and this would probably means we have less guarantee about the liveness of the database. But since this is just a sample configuration it should be fine

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* workflows: remove main.yml, add platforms to buildx matrix in docker.yml

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* workflows: set docker buildx to build for amd64 and arm64 only

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-entrypoint: don't force build everytime before start

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-entrypoint: implement init verb

This would allow you to change between "setup" (automated setup using environmental variables which is the current preferred way to run containerized NodeBB) or "install" (web install that guides user to fill in connection information, which is similar to WordPress)

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* README: mention caveat with MongoDB

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* README: add Docker section placeholder for doc migration

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-entrypoint: add SETUP variable support

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-compose: add force flag to ln on setup

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* docker-compose: fix permission issue; docker-compose: fast exit if still no permission on config dir

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>

* fix: remove redundant FROM

* docs: remove docker stuff (in favour of docs entry, nodebb/docs#78) but add link to cloud install docs

* fix: correctly check if directory is writable

* fix: ignore .docker directory

* fix: multi-arch docker builds and chown performance

* chore: bump database image versions

* fix: move from alpine to slim image

* fix: use omit=dev instead of only=prod

* feat: move entrypoint to install directory

* feat: initialize mongodb user

* feat: use separate rebuild stage

* fix: disable eslint for mongodb script

* fix: remove node_modules bind mount

bind mounts don't save data from container, resulting in a LOONG startup

* feat: prepopulate database defaults for installation

* feat: enable persistence in redis container

* docs: add some comments to the compose file

---------

Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Co-authored-by: Steve Fan <29133953+stevefan1999-personal@users.noreply.github.com>
Co-authored-by: Steve Fan <19037626d@connect.polyu.hk>
Co-authored-by: Julian Lam <julian@nodebb.org>
2023-11-12 13:38:00 -05:00
Barış Soner Uşaklı
d7796f0b73 chore: add test.sh to gitignore 2022-01-19 20:32:00 -05:00
Peter Jaszkowiak
de5a21f19b fix(#8828): web install templates now compiled (#8832) 2020-11-05 12:05:31 -05:00
Barış Soner Uşaklı
5f10d67db5 Remove sounds (#8617)
* feat: remove sounds

* feat: remove more sounds

* feat: disable sounds plugin

* fix: openapi
2020-09-06 23:45:00 -04:00
Barış Soner Uşaklı
cc86f079e1 feat: add link-plugins.sh 2020-07-24 15:04:14 -04:00
Barış Soner Uşaklı
a219285e10 feat: ignore mongodb playground file 2020-05-14 23:10:36 -04:00
Barış Soner Uşaklı
630f5d5b85 fix: only call clearCookie for logged in users 2020-02-18 16:06:05 -05:00
Julian Lam
0de40188f1 Add build/export to repo 2018-04-12 11:09:30 -04:00
Barış Soner Uşaklı
0a5d16d1cd closes #6284 2018-01-26 15:50:31 -05:00
Barış Soner Uşaklı
6b5a0891cb add install\package.json for #6083 2017-11-21 14:38:29 -05:00
Peter Jaszkowiak
dfad76120d Support npm@5 and yarn (#6010)
* Support npm@5 and yarn

Use package.default.json
Partial #6008

- Overwrite package.json with package.default.json values
- `dependencies` field is merged with package.default.json version taking precidence
- `./nodebb upgrade` automatically does those things and runs `git pull`
- use `./nodebb upgrade --dev` to avoid the `git pull`

* added logic to preserve extraneous plugins installed in node_modules/

* Don't automatically git pull

* Simplify package-install, run it on upgrade just in case
2017-11-02 14:12:05 -04:00
Peter Jaszkowiak
f336726173 Bump dependencies (#6001)
* Bump dependencies

* Fix mocha v4 requiring --exit flag

Use nyc instead of the istanbul binary

* Print out summary instead of full report
2017-10-23 18:32:26 -04:00
Peter Jaszkowiak
9a3b684228 Remove dependency, ignore package-lock.json 2017-06-01 14:15:30 -06:00
Danijel Marjanovic
362bccbed8 add .svn line to .gitignore 2017-05-30 16:52:14 +02:00
Peter Jaszkowiak
d4e7db45b7 Use zipObject, more test-related ignores 2017-05-29 11:23:25 -06:00
Peter Jaszkowiak
afb79e97eb Ignore normalised image 2017-05-27 14:52:37 -06:00
Julian Lam
5297c31b1c adding yarn.lock to ignore file 2017-05-23 15:41:27 -04:00
Julian Lam
b58eb99571 re-adding public/uploads to gitignore 2017-05-08 14:26:48 -04:00
Peter Jaszkowiak
f7a964474d Ignore log files 2017-02-23 20:00:30 -07:00
Peter Jaszkowiak
2f07c18c5a All hail the glorious translation prebuilding 2017-01-14 14:08:52 -07:00
psychobunny
949b4aaa1f added logo to .gitignore so it doesn't get updated by test runner 2017-01-03 13:07:24 -05:00
psychobunny
66d8c29d25 use different path for installer files 2016-12-22 11:45:22 -05:00
Julian Lam
252574346e tweak gitignores, closes #5250 2016-12-05 10:32:44 -05:00
Mathias Schreck
159da18e9f Add npm script to run eslint 2016-09-05 11:48:21 +02:00
barisusakli
c8ba61ac7b closes #4791 2016-08-26 00:05:40 +03:00
Yami
d78edf6f72 adding istanbul coverage 2016-04-01 12:20:02 +00:00
barisusakli
0b2f01b8bc info page 2016-03-09 13:19:37 +02:00
psychobunny
c6982f7cdb fixed .gitignore #4256 2016-02-24 17:43:54 -05:00
barisusakli
f512cb543f closes #4256 2016-02-24 11:44:18 +02:00
psychobunny
42c0b973f1 closes #3134 2016-01-18 15:17:38 -05:00
psychobunny
bde6bc67b4 .transifexrc 2015-09-28 10:33:41 -04:00
psychobunny
67c3f106fb tx for windows .gitignore 2015-09-28 10:29:15 -04:00
Nicolas Siver
773d886135 ignore for JetBrains IDEs 2015-07-04 10:11:11 +03:00
psychobunny
0a1b31e6bc small change to gitignore re: logs 2014-10-31 01:56:45 -04:00
psychobunny
2f53a3acc9 adding .gitignore public/uploads 2014-10-08 14:24:17 -04:00
Julian Lam
c2fd89e050 committing of compiled js and css to file on startup 2014-09-29 00:26:43 -04:00
psychobunny
9a1fe2e2cc apparently this line is moot too, then 2014-09-24 21:52:01 -04:00
psychobunny
6f937c59fb gitignore check for config.json too strict 2014-09-24 21:48:42 -04:00
Julian Lam
ef4972f66b added sounds folder to gitignore 2014-04-13 21:34:58 -04:00
Julian Lam
88b4516ef8 added compiled templates to gitignore 2014-03-10 21:55:32 -04:00
Julian Lam
1a85d45567 portuguese and slovak translations 2014-02-27 10:41:59 -05:00
bdharrington7
d60151a6cc excluding .DS_Store 2014-01-12 13:45:26 -08:00
Julian Lam
e4e57ce31f initial commit to emailer system overhaul 2013-12-30 14:02:43 -05:00
akhoury
4e0d0c2c20 adding error.log .gitignore, winston is that you? 2013-12-08 15:16:37 -05:00
akhoury
71125fd1e2 adding webstorm's .idea folder to .gitignore 2013-12-01 10:43:48 -05:00
Julian Lam
08ef67e824 closed #536 2013-11-22 11:42:42 -05:00
Julian Lam
c8c355b319 added komodoproject file extensions to gitignore 2013-11-18 08:19:04 -05:00
Julian Lam
4353a9da25 issue #478 - hot-swapping of plugins 2013-11-03 17:15:18 -05:00
Andrew Darqui
aacd42f4bc ignore vim .swp files from git 2013-10-01 22:38:33 -04:00