However I’m having issues with creating a backup from the admin section.
The error I’m getting is: pg_dump: error: connection to database "discourse development" failed: FATAL: Peer authentication failed for user "postgres".
I checked the pg_hba.conf file, and have all options set to trust.
Would be great i could get some assistance on how to get this to work.
I tried on Ubuntu as well as on MacOSX. Everything is working fine on both (creating Posts, API…) except for the backup functionality.
LOAD_PLUGINS and RAILS_ENV must precede the command to assign environment variables. Following the command, they’re being treated as arguments to rspec, which it doesn’t understand.
Apologies, I misinterpreted your two commands as “the first works for this other spec, the second doesn’t work for this spec”. I don’t have a development environment set up to test.
Looking at the rspec file in Github, I think you’re right that it’s not passing in the environment variables. It looks like you should be able to run d/shell to get a shell inside the container, then run your rspec command there though.
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "LOAD_PLUGINS=1": executable file not found in $PATH: unknown
I’m having the exact same problem as Max. Whenever I try to make a backup or a restore on my local development docker install I get the same error: Peer authentication failed for user "postgres"
After some digging around I found that in the development environment the database configuration shows up like this:
Somehow the dev environment is not setting the username on the environment variables and then the BackupRestore module just defaults the username value to postgres
I’m trying to test a plugin using the docker setup. Randomly the app stops loading and I’m just presented with a blank page until I delete the data folder and rebuild everything. Any tips on how to debug the issue?
I switched from my local Mac to a Ubuntu VM hoping this would make it easier to get this running but unfortunately so far it’s not.
Already fighting some weird permission problems in the early stages. d/bundle install reports it needs sudo rights to install some, d/rails s also comes back with permission problems
Traceback (most recent call last):
8: from /src/bin/unicorn:70:in `<main>'
7: from /src/bin/unicorn:38:in `ensure_cache_clean!'
6: from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `mkdir_p'
5: from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `each'
4: from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `block in mkdir_p'
3: from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `reverse_each'
2: from /usr/local/lib/ruby/2.7.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
1: from /usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `fu_mkdir'
/usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `mkdir': Permission denied @ dir_s_mkdir - /src/tmp (Errno::EACCES)
Any idea what’s going wrong? This machine previously ran a production discourse without issues. I just stopped and removed those containers and cloned the dev git repo into a different directory. Running it all through tmux to handle the differen shell instances.
the only solution is to switch to arm64-capable multi-arch images. These will also be a lot faster and generally more reliable. I recommend investigating which base images you’re using and to switch to multi-arch ones where possible. You can see which architectures are supported by each image on Docker Hub: […]
Is the Discourse team open to supporting a multi-arch image? It looks like the Discourse base image is based on debian:buster-slim, which is multi-arch, so it seems like it shouldn’t be outrageously difficult to make the Discourse base image be multi-arch, but that might put y’all in the position of having to support ARM (in production!). Somebody (the Discourse team?) would need to run the Discourse tests on both x86_64 and ARM, fix issues when they fail, etc.
Would a PR even be welcome here?
(IMO, it seems like ARM is the architecture of the future, even on cloud-hosted environments.)