After having a full disk and not managing to move my images, I decided to delete everything, start a new discourse container and use the backup.
I deleted /var/discourse and did a docker system prune -a
Then I followed the official guide. But… something is wrong:
./launcher rebuild app
x86_64 arch detected.
Ensuring launcher is up to date
Fordere an von origin
Launcher is up-to-date
2.0.20230222-0048: Pulling from discourse/base
Digest: sha256:XXXX
Status: Image is up to date for discourse/base:2.0.20230222-0048
docker.io/discourse/base:2.0.20230222-0048
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-03-04T12:04:27.482399 #1] INFO -- : Reading from stdin
I, [2023-03-04T12:04:27.486188 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2023-03-04T12:04:28.456925 #1] INFO -- : Generating locales (this might take a while)...
Generation complete.
I, [2023-03-04T12:04:28.457319 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2023-03-04T12:04:28.581971 #1] INFO -- :
I, [2023-03-04T12:04:28.583082 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-03-04T12:04:28.588444 #1] INFO -- :
I, [2023-03-04T12:04:28.588792 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2023-03-04T12:04:28.591995 #1] INFO -- :
I, [2023-03-04T12:04:28.592147 #1] INFO -- : > rm -fr /var/run/postgresql
rm: cannot remove '/var/run/postgresql': Directory not empty
I, [2023-03-04T12:04:28.616079 #1] INFO -- :
FAILED
--------------------
Pups::ExecError: rm -fr /var/run/postgresql failed with return #<Process::Status: pid 16 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "rm -fr /var/run/postgresql"
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
$# cat app.yml
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
# - "7890:80" # http
# - "7891:443" # https
labels:
app_name: discourse
traefik.enable: true
traefik.http.routers.discourse.entrypoints: http
traefik.http.routers.discourse.rule: Host(`talk.spielleiten.de`) ## Hier eure Domain eintragen
traefik.http.middlewares.discourse-https-redirect.redirectscheme.scheme: https
traefik.http.routers.discourse.middlewares: discourse-https-redirect
traefik.http.routers.discourse-secure.entrypoints: https
traefik.http.routers.discourse-secure.rule: Host(`talk.spielleiten.de`) ## Hier eure Domain eintragen
traefik.http.routers.discourse-secure.tls: true
traefik.http.routers.discourse-secure.tls.certresolver: http
traefik.http.routers.discourse-secure.service: discourse
traefik.http.services.discourse.loadbalancer.server.port: 80
traefik.docker.network: proxy
docker_args:
- "--network=proxy"
networks:
- proxy
params:
db_default_text_search_config: "pg_catalog.english"
## Set db_shared_buffers to a max of 25% of the total memory.
## will be set automatically by bootstrap based on detected RAM, or you can override
#db_shared_buffers: "256MB"
## can improve sorting performance, but adds memory usage per-connection
#db_work_mem: "40MB"
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
env:
LC_ALL: de_DE.UTF-8
LANG: de_DE.UTF-8
LANGUAGE: dn_DE.UTF-8
EMBER_CLI_PROD_ASSETS: 1
# DISCOURSE_DEFAULT_LOCALE: en
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
#UNICORN_WORKERS: 3
## TODO: The domain name this Discourse instance will respond to
## Required. Discourse will not work with a bare IP number.
DISCOURSE_HOSTNAME: talk.spielleiten.de
## Uncomment if you want the container to be started with the same
## hostname (-h option) as specified above (default "$hostname-$config")
#DOCKER_USE_HOSTNAME: true
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'XXX'
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
[deleted for privacy reasons]
## The http or https CDN address for this Discourse instance (configured to pull)
## see https://meta.discourse.org/t/14857 for details
#DISCOURSE_CDN_URL: https://discourse-cdn.example.com
## The maxmind geolocation IP address key for IP address lookup
## see https://meta.discourse.org/t/-/137387/23 for details
DISCOURSE_MAXMIND_LICENSE_KEY: XXX
## The Docker container is stateless; all data is stored in /shared
volumes:
- volume:
host: /var/discourse/shared/standalone
guest: /shared
- volume:
host: /var/discourse/shared/standalone/log/var-log
guest: /var/log
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
## Any custom commands to run after building
run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
- exec: echo "End of custom commands"
I assume so. But all the other services in dockers work as intended! It’s just discourse that won’t try to access the new data-root.
That’s why I hoped to find a solution here.
I tried both a directoy on the same disk as well als a folder in “data-root” - nothing changed.
Why does the rm command fail? I assume this is still the file system of the operating system (as opposed to inside the container) - and that operation works if I repeat the command in the shell.