Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit ed4bdf2

Browse files
authored
Merge pull request #61 from mongodb/stage
Dochub and new Dockerfile changes
2 parents ed4b2e1 + ec0f699 commit ed4bdf2

27 files changed

+5742
-219
lines changed

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ WORKDIR /home/docsworker
3333
# install snooty parser
3434
RUN python3 -m pip uninstall -y snooty
3535
RUN python3 -m pip install --upgrade pip flit
36-
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
36+
RUN git clone https://github.com/mongodb/snooty-parser.git && \
3737
cd snooty-parser && \
38-
git fetch --all && \
39-
git reset --hard origin/master && \
38+
git fetch --tags && \
39+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
40+
git checkout "$latestTag" && \
4041
FLIT_ROOT_INSTALL=1 python3 -m flit install
4142
ENV PATH="${PATH}:/home/docsworker/.local/bin"
4243

@@ -56,8 +57,8 @@ COPY worker/ .
5657
RUN npm install
5758

5859
# where repo work will happen
59-
RUN mkdir repos && chmod 777 repos
60+
RUN mkdir repos && chmod 755 repos
6061

6162
# entry to kick-off the worker
6263
EXPOSE 3000
63-
CMD ["npm", "start"]
64+
CMD ["npm", "start"]

Dockerfile.xlarge

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ WORKDIR /home/docsworker-xlarge
3333
# install snooty parser
3434
RUN python3 -m pip uninstall -y snooty
3535
RUN python3 -m pip install --upgrade pip flit
36-
RUN git clone https://github.com/mongodb/snooty-parser.git snooty-parser && \
36+
RUN git clone https://github.com/mongodb/snooty-parser.git && \
3737
cd snooty-parser && \
38-
git fetch --all && \
39-
git reset --hard origin/master && \
38+
git fetch --tags && \
39+
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
40+
git checkout "$latestTag" && \
4041
FLIT_ROOT_INSTALL=1 python3 -m flit install
4142
ENV PATH="${PATH}:/home/docsworker-xlarge/.local/bin"
4243

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

6162
# entry to kick-off the worker
6263
EXPOSE 3000
63-
CMD ["npm", "start"]
64+
CMD ["npm", "start"]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ docker run \
1717
* `MONGO_ATLAS_USERNAME` and `MONGO_ATLAS_PASSWORD` is username/password of atlas database
1818
* `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are needed for uploading to S3 via [mut](https://github.com/mongodb/mut)
1919
* `GITHUB_BOT_USERNAME` and `GITHUB_BOT_PASSWORD` are needed so builder can access private repos
20+
* `FASTLY_TOKEN` is needed for connecting to the Fastly edge dictionary
2021

21-
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:
22+
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:
2223
```
2324
--env DB_NAME
2425
```

0 commit comments

Comments
 (0)