This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and docker-compose.yml (#188)
- Loading branch information
1 parent
62b112a
commit 66a64c5
Showing
3 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
66a64c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍