Running Wiki.js on local with docker-compose

snoop2head·2020년 6월 6일
0

Make docker-compose.yml file on project directory

version: "3"
services:
  db:
    image: postgres:11-alpine
    environment:
      POSTGRES_DB: wiki
      POSTGRES_PASSWORD: wikijsrocks
      POSTGRES_USER: wikijs
    logging:
      driver: "none"
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data

  wiki:
    image: requarks/wiki:2
    depends_on:
      - db
    environment:
      DB_TYPE: postgres
      DB_HOST: db
      DB_PORT: 5432
      DB_USER: wikijs
      DB_PASS: wikijsrocks
      DB_NAME: wiki
    restart: unless-stopped
    ports:
      - "80:3000"

volumes:
  db-data:

Make two images with the following commands

docker-compose up --build

(optional) If you want to run specific image only, run as following:

docker-compose start db      

or

docker-compose start wiki

Access to http://localhost:80/ (or just http://localhost/ )

Source

profile
break, compose, display

0개의 댓글