Hello
I am still trying to create our pipeline to work with Discourse.
I have a fresh Redis container and a fresh Postgres container to use with discourse.
Next step for me is build the image of the web_only container to then connect them and start the installation if I am right, but I am unable to bootsrap the container.
I am getting this error:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 4632 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
0e576a9672a887d23579100756224f920ab595b819874b5e7cbe4868f4234481
** 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.
I am confused about why is trying to migrate when I have nothing built yet. Am I doing the steps wrong?
This is the web_only.yml I am using (pretty basic one):
templates:
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
env:
LANG: en_US.UTF-8
UNICORN_WORKERS: 2
DISCOURSE_DB_USERNAME: root
DISCOURSE_DB_PASSWORD: my-secret-pw
DISCOURSE_DB_HOST: 127.0.0.1
DISCOURSE_DB_NAME: communities
DISCOURSE_DEVELOPER_EMAILS: 'email@mail.com'
DISCOURSE_HOSTNAME: 'localhost'
DISCOURSE_REDIS_HOST: 127.0.0.1
SKIP_POST_DEPLOYMENT_MIGRATIONS: 1
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-solved.git
- git clone https://github.com/discourse/discourse-voting.git
- git clone https://github.com/discourse/discourse-slack-official.git
- git clone https://github.com/discourse/discourse-assign.git
run:
- exec:
cd: /var/www/discourse
cmd:
- sed -i 's/GlobalSetting.serve_static_assets/true/' config/environments/production.rb
- bash -c "touch -a /shared/log/rails/{sidekiq,puma.err,puma}.log"
- bash -c "ln -s /shared/log/rails/{sidekiq,puma.err,puma}.log log/"
- sed -i 's/default \$scheme;/default https;/' /etc/nginx/conf.d/discourse.conf
Do I need to have a Postgres and a Redis container up and running everytime I need to bootstrap a build? I thought that I could prepare the images to upload them myself and then rerun my environments with them without the need of doing something to my database…
The pipeline I was asked to build is:
- Github actions: that can bootstrap the image in case of an update is needed.
- Push the image to a private registry.
- Then my Kubernetes cluster could get updates and deploy them in my environments, from dev to prod.
Thanks again for all the help and support.