안녕하세요,
보안상의 이유로 데이터베이스에 접근해서는 안 되므로 ./launcher bootstrap app에서 [bundle exec rake assets:precompile] 과정을 건너뛰어야 합니다.
web-template를 수정하여 이 과정을 건너뛰도록 했는데, Discourse 실행에는 성공했습니다.
하지만 화면이 비어 있으며, 아래와 같이 자산(assets) 관련 오류가 발생하고 있습니다.
discourse-details.js:1 Failed to load resource: the server responded with a status of 404 ()
discourse-local-dates.js:1 Failed to load resource: the server responded with a status of 404 ()
discourse-presence.js:1 Failed to load resource: the server responded with a status of 404 ()
discourse-narrative-bot.js:1 Failed to load resource: the server responded with a status of 404 ()
docker_manager.js:1 Failed to load resource: the server responded with a status of 404 ()
lazy-yt.js:1 Failed to load resource: the server responded with a status of 404 ()
poll.js:1 Failed to load resource: the server responded with a status of 404 ()
discourse-presence.js:1 Failed to load resource: the server responded with a status of 404 ()
docker_manager.js:1 Failed to load resource: the server responded with a status of 404 ()
lazy-yt.js:1 Failed to load resource: the server responded with a status of 404 ()
poll.js:1 Failed to load resource: the server responded with a status of 404 ()
참고: Rake assets:precompile without database
테마는 데이터베이스에 저장됩니다(관리자 UI에서 편집됨). 따라서 CSS는 PostgreSQL 안에 있으므로, 이를 사전 컴파일하려면 빌드 시점에 데이터베이스 연결이 필요합니다.
그래서 저는 같은 데이터베이스를 사용하는 보안이 없는 환경(non-security zone)에서 "precompile"을 성공적으로 수행했고, 잘 실행되었습니다.
데이터베이스에 테마와 CSS가 정상적으로 존재하는지 확인했습니다.
하지만 같은 데이터베이스를 사용하는 “non-precompile” 서버에 연결했을 때 css, js, 테마 파일을 가져오지 못했습니다.
보안이 없는 환경의 자산 파일들을 대상 서버로 복사&붙여넣기(Copy & Paste)하고 싶습니다.
어떤 경로/디렉토리에 붙여넣어야 하나요? 아니면 이 작업을 위해 다른 것이 필요한가요?
아니면… "precompile"을 건너뛰면서 자산(테마, css, js 등)을 가져오는 방법이 있을까요?
빠른 답변을 기다리겠습니다. 감사합니다.