Skip to content

Commit

Permalink
Merge pull request #61 from mongodb/stage
Browse files Browse the repository at this point in the history
Dochub and new Dockerfile changes
  • Loading branch information
skerschb authored Jan 14, 2020
2 parents ed4b2e1 + ec0f699 commit ed4bdf2
Show file tree
Hide file tree
Showing 27 changed files with 5,742 additions and 219 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ WORKDIR /home/docsworker
# install snooty parser
RUN python3 -m pip uninstall -y snooty
RUN python3 -m pip install --upgrade pip flit
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
RUN git clone https://github.com/mongodb/snooty-parser.git && \
cd snooty-parser && \
git fetch --all && \
git reset --hard origin/master && \
git fetch --tags && \
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
git checkout "$latestTag" && \
FLIT_ROOT_INSTALL=1 python3 -m flit install
ENV PATH="${PATH}:/home/docsworker/.local/bin"

Expand All @@ -56,8 +57,8 @@ COPY worker/ .
RUN npm install

# where repo work will happen
RUN mkdir repos && chmod 777 repos
RUN mkdir repos && chmod 755 repos

# entry to kick-off the worker
EXPOSE 3000
CMD ["npm", "start"]
CMD ["npm", "start"]
9 changes: 5 additions & 4 deletions Dockerfile.xlarge
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ WORKDIR /home/docsworker-xlarge
# install snooty parser
RUN python3 -m pip uninstall -y snooty
RUN python3 -m pip install --upgrade pip flit
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
RUN git clone https://github.com/mongodb/snooty-parser.git && \
cd snooty-parser && \
git fetch --all && \
git reset --hard origin/master && \
git fetch --tags && \
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
git checkout "$latestTag" && \
FLIT_ROOT_INSTALL=1 python3 -m flit install
ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin"

Expand All @@ -60,4 +61,4 @@ RUN mkdir repos && chmod 755 repos

# entry to kick-off the worker
EXPOSE 3000
CMD ["npm", "start"]
CMD ["npm", "start"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ docker run \
* `MONGO_ATLAS_USERNAME` and `MONGO_ATLAS_PASSWORD` is username/password of atlas database
* `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are needed for uploading to S3 via [mut](https://github.com/mongodb/mut)
* `GITHUB_BOT_USERNAME` and `GITHUB_BOT_PASSWORD` are needed so builder can access private repos
* `FASTLY_TOKEN` is needed for connecting to the Fastly edge dictionary

If you are running a local version of the docker image for testing, we have a separate staging environment setup. Testing in this environment is automated through the stage branch. Add the following env variables to the `docker run` command:
If you are running a local version of the docker image for testing, we have a separate staging environment setup. Testing in this environment is automated through the "stage" branch. Add the following env variables to the `docker run` command:
```
--env DB_NAME
```
Expand Down
Loading

0 comments on commit ed4bdf2

Please sign in to comment.