-
Notifications
You must be signed in to change notification settings - Fork 0
add x86 version #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Congrats @Dashlorde 🎉 |
empeje
left a comment
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.
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> | |||
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.
Add me and @dogi for the future support
|
Will test it today and merge it if its good, again congrats @Dashlorde |
empeje
left a comment
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think all these environments necessary
|
Related to #1 |
empeje
left a comment
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.
Reduce hardcoded stuffs.
| * 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dashlorde good job - some change wishes ;)
| @@ -0,0 +1,62 @@ | |||
| # Bell | |||
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.
readme.md should be README.md
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/ |
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.
... until here
x86/bell/server.js
Outdated
|
|
||
| PortJack.get(/^(.+)$/, function(req, res) { | ||
|
|
||
| res.setHeader('Location', 'http://' + HOST + ':2200/apps/_design/bell/MyApp/index.html') |
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.
please use standard port 5984
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 \ |
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.
not needed ...
| @@ -0,0 +1,24 @@ | |||
| FROM node:6.11-alpine | |||
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.
dockerfile should be Dockerfile
x86/docker-compose-ready.yml
Outdated
| - 5984 | ||
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" |
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.
no 2200 please just use 5984
x86/docker-compose-ready.yml
Outdated
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" | ||
| - "2201:5986" |
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.
not needed
x86/docker-compose.yml
Outdated
| - 5984 | ||
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" |
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.
please use 5984 not 2200
x86/docker-compose.yml
Outdated
| image: klaemo/couchdb | ||
| ports: | ||
| - "2200:5984" | ||
| - "2201:5986" |
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.
not needed with klaemo


No description provided.