Docker Swarm 서비스로 Discourse 실행하기

Discourse를 Docker Swarm 서비스로 배포하려고 합니다.
공식 launcher 방법을 사용하여 단일 컨테이너 환경에서 Discourse를 배포했습니다.
스탠드얼론 컨테이너 내부의 /var/www/discourse에서 필요한 파일을 호스트 서버의 특정 위치로 복사하여 Swarm 서비스에서 사용하도록 했습니다.
기존의 Postgres 서버를 사용했습니다.
Discourse를 위한 전용 Redis 컨테이너를 생성했습니다.
Discourse가 시작되지 않고 다음과 같은 오류와 함께 종료됩니다:
uninitialized constant Discourse::SiteSetting (NameError)
컨테이너는 PostgreSQL과 Redis에 문제 없이 연결됩니다.
DISCOURSE_HOSTNAME 환경 변수가 discourse.xyz로 올바르게 설정되어 있습니다.
이것이 누락된 의존성이나 손상된 자산 컴파일 때문일 수 있나요?
Discourse가 Swarm 환경에서 올바르게 작동하려면 어떤 수정이 필요합니까?

version: '3.7'

services:
  app:
    image: discourse-app:latest
    user: "1000:1000"
    working_dir: /var/www/discourse
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      labels:
        - "traefik.enable=true"
        - "traefik.backend=discourse"
        - "traefik.docker.network=service"
        - "traefik.frontend.rule=Host:discourse.xyz"
        - "traefik.port=80"
    command:
      - "/bin/bash"
      - "-c"
      - |
        bundle config set deployment true && \
        bundle config set without 'test development' && \
        RAILS_ENV=production bundle install && \
        RAILS_ENV=production bundle exec rake db:migrate && \
        RAILS_ENV=production bundle exec rails server -b 0.0.0.0
    environment:
      DISCOURSE_DB_HOST: "postgrest1"
      DISCOURSE_DB_PORT: "5432"
      DISCOURSE_DB_USERNAME: "postgres"
      DISCOURSE_DB_PASSWORD: "****"
      DISCOURSE_DB_NAME: "discourse"
      DISCOURSE_REDIS_HOST: "redis-discourse"
      DISCOURSE_REDIS_PORT: "6379"
      DISCOURSE_REDIS_PASSWORD: "****"
      DISCOURSE_HOSTNAME: "discourse.xyz"
      DISCOURSE_DEVELOPER_EMAILS: "abc@xyz.com"
      DISCOURSE_SMTP_ADDRESS: "xyz"
      DISCOURSE_SMTP_PORT: "25"
      DISCOURSE_NOTIFICATION_EMAIL: "donotreply@xyz.com"
    networks:
      - service
    ports:
      - "8080:80"
      - "8443:443"
    volumes:
      - type: bind
        source: /discourse/discourse_files/discourse
        target: /var/www/discourse
        bind:
          propagation: rprivate

      - type: bind
        source: /discourse/shared/standalone
        target: /shared
        bind:
          propagation: rprivate

      - type: bind
        source: /discourse/shared/standalone/log/rails
        target: /data/modulusdata/infra/discourse/shared/standalone/log/rails
        bind:
          propagation: rprivate

      - type: bind
        source: /discourse/shared/standalone/log/var-log
        target: /var/log
        bind:
          propagation: rprivate

networks:
  service:
    external: true

여기서 기대할 수 있는 지원 범위를 벗어난 내용입니다. 잘못될 수 있는 사소한 부분이 너무 많기 때문에, 표준 설치가 실제로 지원되는 유일한 방식입니다. 몇 가지 힌트를 드릴게요. 막혀 있고 예산이 있다면 저에게 연락하거나 Marketplace 채널에서 질문할 수 있습니다.

베이스 이미지를 사용할 수 없습니다. 직접 부트스트랩하여 레포지토리에 푸시해야 합니다. 재능이 있고 시간이 충분하다면 GitHub이 대신하도록 설정할 수 있습니다.

에셋을 S3에 업로드해야 합니다(업로드를 위한 S3 호환 객체 스토리지 제공자 구성)

이 모든 것이 동일한 로그 파일에 기록되도록 하려는 건가요? 그냥 컨테이너 안에 두어 무시하는 것을 권장합니다.

포트 8080과 8443은 필요 없다고 생각합니다. traefik이 이를 처리하고 있지 않나요? Discourse는 비표준 포트에서는 작동하지 않습니다.

다음과 같은 형태여야 합니다:

./launcher bootstrap app
docker push-that-container-to-your-private-repo
./launcher start-cmd

그 후 start-cmd의 변수를 사용하여 데이터베이스, redis 등을 찾을 수 있도록 필요한 구성으로 swarm을 시작할 수 있습니다. 여러 구성을 하고 있는 것으로 보이지만, 이것이 모두 필요한지 확신은 없습니다.