Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Dockerを使ってローカルにknowledgeサーバを立てる

More than 3 years have passed since last update.
  1. knowledgeとpostgresのイメージをDocker Hubからダウンロードしてくる

    docker pull koda/docker-knowledge
    docker pull postgres
    
  2. postgresを起動する

    docker run \
      -d \
      --name knowledge-no-db \
      -v /Users/hogefuga/knowledge/db/:/var/lib/postgresql/data \
      -e POSTGRES_USER=hogefuga \
      -e POSTGRES_PASSWORD=foobar \
      postgres
    
  3. knowledgeを起動する

    docker run \
      -d \
      --name knowledge \
      -v /Users/hogefuga/knowledge/app/:/root/.knowledge \
      -p 80:8080 \
      --link knowledge-no-db:postgres \
      koda/docker-knowledge
    
  4. ブラウザでknowledgeを開き、adminアカウントでサインインし、
    システム設定の「データベースの接続先変更」画面で組み込みDBからpostgresにDBを変更する

    項目
    URL jdbc:postgresql://knowledge-no-db:5432/hogefuga
    user hogefuga
    password foobar

ちょっと触って見る程度とかでpostgres不要であれば、以下のみでOK。

docker run \
  -d \
  --name knowledge \
  -v /Users/hogefuga/knowledge/app/:/root/.knowledge \
  -p 80:8080 \
  koda/docker-knowledge
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away