Skip to content

Commit

Permalink
Update Dockerfile-test
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Dec 29, 2023
1 parent 67cfae9 commit b3b7f13
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions dockerfiles/web/Dockerfile-test
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ ENV DISPLAY=:1
RUN apt-get update && apt-get install -y xvfb libpq-dev python3-dev libsqlite3-0 && \
apt-get clean

# install node
ENV NODE_SETUP_SHA=5d07994f59e3edc2904c547e772b818d10abb066f6ff36ab3db5d686b0fe9a73
RUN curl ${CURL_FLAGS} \
https://raw.githubusercontent.com/nodesource/distributions/b8510857fb4ce4b023161be8490b00119884974c/deb/setup_12.x
RUN echo "${NODE_SETUP_SHA} setup_12.x" | sha256sum --check -
RUN bash setup_12.x
RUN apt-get install -y nodejs

# install geckodriver
ENV GECKODRIVER_VERSION="v0.26.0"
ENV GECKODRIVER_SHA=d59ca434d8e41ec1e30dd7707b0c95171dd6d16056fb6db9c978449ad8b93cc0
Expand All @@ -23,14 +31,6 @@ RUN echo "${GECKODRIVER_SHA} geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz"
RUN mkdir geckodriver
RUN tar -xzf geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz -C geckodriver

# install node
ENV NODE_SETUP_SHA=5d07994f59e3edc2904c547e772b818d10abb066f6ff36ab3db5d686b0fe9a73
RUN curl ${CURL_FLAGS} \
https://raw.githubusercontent.com/nodesource/distributions/b8510857fb4ce4b023161be8490b00119884974c/deb/setup_12.x
RUN echo "${NODE_SETUP_SHA} setup_12.x" | sha256sum --check -
RUN bash setup_12.x
RUN apt-get install -y nodejs

# install yarn
RUN npm install -g yarn
RUN mkdir /var/www ./node_modules /.cache /.yarn /.mozilla
Expand All @@ -41,15 +41,20 @@ RUN chmod -R 777 /usr/src/app/ /var/lib/xkb /.cache /.yarn /.mozilla

COPY requirements.txt dev-requirements.txt /usr/src/app/
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --no-cache-dir -r dev-requirements.txt

RUN test "${DOCKER_BUILD_ENV}" = production || pip3 install --no-cache-dir -r dev-requirements.txt

COPY package.json /usr/src/app/
RUN yarn

COPY test_data.py /usr/src/app/
COPY mypy.ini /usr/src/app/
EXPOSE 3000

ENV PATH="/usr/src/app/geckodriver:${PATH}"
ENV SECRET_KEY 4Q6ZaQQdiqtmvZaxP1If
ENV SQLALCHEMY_DATABASE_URI postgresql://openoversight:terriblepassword@postgres/openoversight-dev

WORKDIR /usr/src/app/

CMD ["OpenOversight/scripts/entrypoint_dev.sh"]

0 comments on commit b3b7f13

Please sign in to comment.