Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

added Dockerfile #103

Merged
merged 2 commits into from Jun 21, 2017
Merged

added Dockerfile #103

merged 2 commits into from Jun 21, 2017

Conversation

dannycoates
Copy link
Contributor

@dannycoates dannycoates commented Jun 20, 2017

closes #67

@dannycoates
Copy link
Contributor Author

@relud how's this Dockerfile?

Dockerfile Outdated
RUN mkdir static
RUN npm install

EXPOSE 1443
Copy link
Contributor

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.

- .node_modules
- run:
name: test
command: npm test
Copy link
Contributor

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
Copy link
Contributor

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'

@dannycoates dannycoates force-pushed the docker branch 2 times, most recently from 208f9f2 to 4508920 Compare June 20, 2017 23:01
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'
Copy link
Contributor

@relud relud Jun 20, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerize server
2 participants