안녕하세요 ![]()
Discourse와 함께 사용할 파이프라인을 만드는 것을 계속 시도하고 있습니다.
Discourse와 함께 사용할 새 Redis 컨테이너와 새 Postgres 컨테이너를 준비했습니다.
제가 이해하기로는 다음 단계는 web_only 컨테이너의 이미지를 빌드한 후, 이들을 연결하고 설치를 시작하는 것인데, 컨테이너를 부트스트랩(bootstrap)하는 데 실패하고 있습니다.
다음과 같은 오류가 발생합니다:
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.
아직 아무것도 빌드하지 않았는데 왜 마이그레이션을 시도하는지 혼란스럽습니다. 제가 단계를 잘못 수행하고 있는 건가요?
제가 사용 중인 web_only.yml 파일입니다 (매우 기본적인 구성):
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
부트스트랩 빌드를 수행할 때마다 Postgres와 Redis 컨테이너가 실행 중이어야 하나요? 이미지를 미리 준비해서 직접 업로드한 후, 데이터베이스에 대한 추가 작업 없이 환경에서 다시 실행할 수 있을 것이라 생각했거든요…
제가 구축하라는 파이프라인은 다음과 같습니다:
- Github Actions: 업데이트가 필요한 경우 이미지를 부트스트랩할 수 있어야 합니다.
- 이미지를 비공개 레지스트리에 푸시합니다.
- 그런 다음 Kubernetes 클러스터가 업데이트를 가져와 dev부터 prod까지 환경에 배포합니다.
다시 한번 모든 도움과 지원에 감사드립니다. ![]()