Conversation
@relud how's this Dockerfile? |
Dockerfile
Outdated
RUN mkdir static | ||
RUN npm install | ||
|
||
EXPOSE 1443 |
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.
You should ENV PORT=1443
and EXPOSE $PORT
, and the app should accept a PORT
env variable to listen on. This is because cloudops deploys docker containers with --net host
, so PORT must be configurable.
.circleci/circle.yml
Outdated
- .node_modules | ||
- run: | ||
name: test | ||
command: npm test |
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.
you should add a deploy step to circleci that builds the docker image and uploads it, like this:
deployment: latest: branch: master commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker build . -t mozilla/portal:latest - docker push mozilla/portal:latest
I will add the needed env vars in circle when this is ready
Dockerfile
Outdated
RUN npm install | ||
|
||
ENV P2P_LISTEN_PORT=1443 | ||
EXPOSE $P2P_LISTEN_PORT |
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 standard name for this variable is 'PORT'
208f9f2
to
4508920
Compare
docs/docker.md
Outdated
|
||
Example | ||
|
||
docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com' |
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.
this command should probably end with an image name, like mozilla/portal:latest
closes #67