Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Add Dockerfile and docker-compose.yml (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagofigueiro authored and harshavardhana committed Aug 31, 2016
1 parent 62b112a commit 66a64c5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ruby:2.2.2
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /doctor
WORKDIR /doctor
ADD Gemfile Gemfile.lock /doctor/
RUN bundle install
ADD . /doctor
RUN rm config/database.yml
# TODO: ADD console_whitelist.rb config/initializers/
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Project Doctor
* Doctor is a Documentation Server for all your project docs.
# Project Doctor
* Doctor is a Documentation Server for all your project docs.
* Doctor beautifully decouples document serving and document contents.
* Create your docs in markdown. Store them anywhere (github/dropbox/google drive/ anywhere really).
* Login to Doctor's Dashboard. Setup links to your doc files in Doctor's Dashboard.
* You are done!
* Login to Doctor's Dashboard. Setup links to your doc files in Doctor's Dashboard.
* You are done!


## Pre-Requisites to Deploy Doctor
Expand All @@ -28,16 +28,21 @@
> rake db:setup
> rails s
```
Now visit http://localhost:3000
Now visit http://localhost:3000

Use `[email protected]` with password `Doctor!23` to login. Visit [http://localhost:3000](http://localhost:3000) to navigate the docs. This can be changed anytime via the Dashboard. We highly recommend that you do if you use Doctor in deployment.

### Using Docker
```bash
> git clone https://github.com/minio/doctor.git
> cd doctor
> docker-compose up
```

## Organization
* Documents are organized under Categories.
* Documents are organized under Categories.
* Login to the dashboard
* Step 1 : Use the Dashboard to create a new Category : http://localhost:3000/category/new
* Step 2 : Use the Dashboard to create a link to a new Document : http://localhost:3000/document/new
* Step 3: Paste the raw URL to the md file when linking a new document. The "Raw" button is on the top of the MD file in github.
* Required : All documents need to be associated under a Category


18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '2'
services:
db:
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
web:
build: .
# FIXME: don't destroy data between restarts
# FIXME: wait for postgres to get ready on the first run
command: bash -c "bundle exec rake db:setup && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
DATABASE_URL: postgresql://postgres:postgres@db/doctor?pool=5
ports:
- "3000:3000"
depends_on:
- db

1 comment on commit 66a64c5

@deekoder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.