New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: docker improvements #12031
feat: docker improvements #12031
Conversation
… is no alpine build (cherry picked from commit 90516a3)
(cherry picked from commit 38e4295)
(cherry picked from commit 8dcc6f2)
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
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>
…tion Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
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>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
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>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
…ill no permission on config dir Signed-off-by: steve <29133953+stevefan1999-personal@users.noreply.github.com>
…ut add link to cloud install docs
💡 Friendly NoteThis pull request was made against the
Thanks! |
6c0d1b4
to
80854e5
Compare
bind mounts don't save data from container, resulting in a LOONG startup
I think its a good time to add devcontainer support too |
It'd be mostly independent from the changes here, so I'd leave it for a separate PR. I'll also probably update my quickstart plugin devcontainer PR first though, as I think it's a bit more useful (since I think more people in the community work on plugins than core NodeBB and it's a better entry point :) |
It seems like I have to sign in my formal account for some of the commits I accidentally made using that. Let me handle that. Edit: Done! |
When can we see this merged? An up-to-date docker installation is a must. |
Thanks @oplik0 & @stevefan1999 |
Hi, all. I'm a prospective NodeBB user stuck on this issue from the forums, namely that I didn't have a local
Okay, I know how to work around this1, and could easily do a PR, but I can't be sure if my workaround is breaking something else, particularly if you're using this Dockerfile in some GitHub Actions plumbing. I know it's not your job to give Docker lessons, but may I know what the purpose of all the Footnotes |
I'm still unclear on why rebuilding is necessary for each architecture in Stage 2, While the final image is not yet complete, should you encounter any permissions-related errors, you're welcome to reference my image. @ernstki docker-compose.yml
|
Rebuild is mainly for CI where aarch64 and arm32 builds are also made with qemu - it seems like IO operations are really slow in qemu, and running Compare these two runs:
Huh, I trusted Docker docs that options for local volume driver are unsupported on Windows, which is why I thought bind mounts were the only cross-platform way of mounting directories where you want them. Turns out this was a lie, and it does seem to deal with permissions a bit better than bind mounts (it'll still break if there isn't a user with uid 1000, and for the deeper nesting I'll keep for compatibility reasons requires the directory structure to already exist, but otherwise seems to work more reliably)
Did something change here? I thought they were only loaded as defaults, but no - they really do have priority over values set from the web. I guess this should be fixed.
Is it actually that lighter weight? I'll probably need to do some testing, but even by PNPMs own benchmarks, NPM is comparable in the situation this container mostly runs into on startup - running with And I'm saying this as someone who generally prefers PNPM :) If it turns out to be significantly faster and doesn't cause any issues I'd certainly be for switching. |
Use it if you need it :) |
Obviously I am also PNPM lover, but I'm sure everyone has a favourite package manager, and I don't want to force it on anyone. What about specifying a package manager in an environment variable in It's more elegant :) |
Huh, that's actually really weird, my experience on an aarch64 Linux platform (2 Ampre A1 cores) the entire second stage takes 4.8 seconds, 4.6 of which is the copy. Are you on an ARM Mac perhaps? But if it's causing issues it might be a good idea to try fixing it, so I'll look into it more.
It might've been at least in part because
Hmm... I guess I could make the image respect a |
This PR brings over most of the improvements from #8704, foregoing the move to alpine for now due to issues with sass
Summary of the changes:
ports
section. Current default has nodebb seemingly just not work)nodebb
database and not justadmin
NodeBB/docs#78 should be merged after this is pushed to
master
- though with the additional mongodb section removed since it's been fixed here.Thanks to @stevefan1999-personal for authoring most of the changes here