Conversation
|
Congrats @Dashlorde 🎉 |
empeje
left a comment
There was a problem hiding this comment.
Seems good, could you create README.md and a demo?
x86/bell/dockerfile
Outdated
| @@ -0,0 +1,25 @@ | |||
| FROM node:6.11-alpine | |||
|
|
|||
| LABEL MAINTAINER Yunlu Zhou <zhouyunlu0216@ole.org> | |||
|
Will test it today and merge it if its good, again congrats @Dashlorde |
empeje
left a comment
There was a problem hiding this comment.
Just realize that there are some unnecessary things there, will review your code again
| image: treehouses/bell:node-latest | ||
| ports: | ||
| - "80:80" | ||
| environment: |
There was a problem hiding this comment.
I don't think all these environments necessary
|
Related to #1 |
| * Bell. It is bell app container build with node.js. | ||
| * Couchdb. It is the database container which is initiated with `db-init`. | ||
|
|
||
| ## How to use |
There was a problem hiding this comment.
I just create https://hub.docker.com/r/treehouses/bell/ and we can actually push the prebuilt image to there.
The readme should contain how to built it manually and how to use the ready-to-go image.
| WORKDIR /app/server/src | ||
|
|
||
| COPY server.js ./ | ||
| COPY package.json ./ |
There was a problem hiding this comment.
why not use original .package.json?
x86/bell/dockerfile
Outdated
|
|
||
| ENV version '0.13.21' | ||
|
|
||
| RUN mkdir -p /app/server/src |
There was a problem hiding this comment.
No need to do mkdir -p /app/server/src since it will create new layer. Just do the WORKDIR here.
x86/bell/server.js
Outdated
|
|
||
| PortJack.get(/^(.+)$/, function(req, res) { | ||
| var options = { | ||
| "127.0.0.1": "http://127.0.0.1:2200/apps/_design/bell/MyApp/index.html", |
There was a problem hiding this comment.
The address should set by dynamically and specified by the environment variable.
x86/bell/server.js
Outdated
| if (options.hasOwnProperty(req.hostname)) { | ||
| res.setHeader('Location', options[req.hostname]) | ||
| } else { | ||
| res.setHeader('Location', 'http://docker.ole.org:2200/apps/_design/bell/MyApp/index.html') |
There was a problem hiding this comment.
The address should set by dynamically and specified by the environment variable.
|
Can you create a screenshot of the working bell docker on your machine? |
|
Awesome @Dashlorde |
dogi
left a comment
There was a problem hiding this comment.
@Dashlorde good job - some change wishes ;)
| @@ -0,0 +1,62 @@ | |||
| # Bell | |||
x86/bell/dockerfile
Outdated
| wget -O BeLL-Apps-${version}.tar.gz \ | ||
| https://github.com/open-learning-exchange/BeLL-Apps/archive/${version}.tar.gz && \ | ||
| tar xvf BeLL-Apps-${version}.tar.gz && \ | ||
| mv BeLL-Apps-${version}/* /app/server/src/ |
x86/bell/server.js
Outdated
|
|
||
| PortJack.get(/^(.+)$/, function(req, res) { | ||
|
|
||
| res.setHeader('Location', 'http://' + HOST + ':2200/apps/_design/bell/MyApp/index.html') |
x86/db-init/couchdb-setup.sh
Outdated
| fi | ||
|
|
||
| # Default port for CouchDB accessed from host machine is 2200 | ||
| PORT=${PORT:-2200} |
There was a problem hiding this comment.
please use standard port 5984 and not 2200
x86/bell/dockerfile
Outdated
|
|
||
| RUN mkdir -p /app/server/src && \ | ||
| apk add --update openssl && npm install express && \ | ||
| wget -O BeLL-Apps-${version}.tar.gz \ |
| @@ -0,0 +1,24 @@ | |||
| FROM node:6.11-alpine | |||
x86/docker-compose-ready.yml
Outdated
| - 5984 | ||
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" |
x86/docker-compose-ready.yml
Outdated
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" | ||
| - "2201:5986" |
x86/docker-compose.yml
Outdated
| - 5984 | ||
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" |
x86/docker-compose.yml
Outdated
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" | ||
| - "2201:5986" |


No description provided.