-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create test-specific 🐳 file #1082
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
1e8ff2a
Update test_prs.yml
michplunkett 5dd6e11
Update Dockerfile
michplunkett 3d4500a
Create Dockerfile-test
michplunkett 61e966b
Update Makefile
michplunkett 65deb3b
Update docker-compose.yml
michplunkett f1ad1dd
Update docker-compose.yml
michplunkett e6aeccc
Update Makefile
michplunkett 735da8f
Update docker-compose.yml
michplunkett d073535
Update Dockerfile-test
michplunkett 13dbf11
Update Dockerfile-test
michplunkett 2c30c68
Update Dockerfile-test
michplunkett 34719c2
Revert "Update Dockerfile-test"
michplunkett 38e5529
Update dev-requirements.txt
michplunkett 4d00bd6
Update dev-requirements.txt
michplunkett 17b1c09
Update Dockerfile-test
michplunkett fbca017
Update Dockerfile
michplunkett 139c375
Update Dockerfile-test
michplunkett c0edc4b
Update Dockerfile
michplunkett 551d972
Update docker-compose.yml
michplunkett 0904a7d
Rename file
michplunkett 12c6f08
Update docker-compose.yml
michplunkett 2fde15b
Update docker-compose.yml
michplunkett 7dea044
Update docker-compose.yml
michplunkett f5bbba5
Remove python version from dev
michplunkett a56bdad
Update Dockerfile-dev
michplunkett f82d562
Merge branch 'develop' into test_docker_file
michplunkett c5d175e
Update test_prs.yml
michplunkett 910865a
Merge branch 'develop' into test_docker_file
michplunkett 69c0074
Merge branch 'develop' into test_docker_file
michplunkett 9b6f0bd
Merge branch 'develop' into test_docker_file
michplunkett 061339d
Merge branch 'develop' into test_docker_file
michplunkett b9de4a8
Merge branch 'develop' into test_docker_file
michplunkett 64249c6
Merge branch 'develop' into test_docker_file
michplunkett 5b148c9
Merge branch 'develop' into test_docker_file
michplunkett 06db655
Update Makefile
michplunkett fc79786
Update Makefile
michplunkett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,16 +25,13 @@ services: | |
restart: always | ||
build: | ||
context: . | ||
args: | ||
- DOCKER_BUILD_ENV | ||
- MAKE_PYTHON_VERSION | ||
dockerfile: ./dockerfiles/web/Dockerfile | ||
dockerfile: dockerfiles/web/Dockerfile-dev | ||
environment: | ||
APPROVE_REGISTRATIONS: "${APPROVE_REGISTRATIONS}" | ||
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}" | ||
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION}" | ||
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}" | ||
ENV: "${ENV:-development}" | ||
ENV: "development" | ||
FLASK_APP: OpenOversight.app | ||
FLASK_DEBUG: 1 | ||
OO_HELP_EMAIL: "[email protected]" | ||
|
@@ -55,3 +52,19 @@ services: | |
- "3000" | ||
ports: | ||
- "3000:3000" | ||
|
||
web-test: | ||
restart: always | ||
build: | ||
context: . | ||
args: | ||
- MAKE_PYTHON_VERSION | ||
dockerfile: dockerfiles/web/Dockerfile-test | ||
environment: | ||
ENV: "testing" | ||
FLASK_APP: OpenOversight.app | ||
OO_HELP_EMAIL: "[email protected]" | ||
OO_SERVICE_EMAIL: "[email protected]" | ||
TIMEZONE: "America/Chicago" | ||
volumes: | ||
- ./OpenOversight/:/usr/src/app/OpenOversight/:z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM python:3.11-bullseye | ||
|
||
WORKDIR /usr/src/app | ||
|
||
ENV CURL_FLAGS="--proto =https --tlsv1.2 -sSf -L --max-redirs 1 -O" | ||
|
||
ENV DEBIAN-FRONTEND noninteractive | ||
ENV DISPLAY=:1 | ||
|
||
# install apt dependencies | ||
RUN apt-get update && apt-get install -y xvfb libpq-dev python3-dev && \ | ||
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 yarn | ||
RUN npm install -g yarn | ||
RUN mkdir /var/www ./node_modules /.cache /.yarn /.mozilla | ||
RUN touch /usr/src/app/yarn-error.log | ||
COPY yarn.lock /usr/src/app/ | ||
RUN chmod -R 777 /usr/src/app/ /var/lib/xkb /.cache /.yarn /.mozilla | ||
|
||
|
||
COPY requirements.txt /usr/src/app/ | ||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
|
||
COPY package.json /usr/src/app/ | ||
RUN yarn | ||
|
||
COPY test_data.py /usr/src/app/ | ||
|
||
ENV SECRET_KEY 4Q6ZaQQdiqtmvZaxP1If | ||
ENV SQLALCHEMY_DATABASE_URI postgresql://openoversight:terriblepassword@postgres/openoversight-dev | ||
|
||
WORKDIR /usr/src/app/ | ||
|
||
CMD ["OpenOversight/scripts/entrypoint_dev.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We have stopped using
main
, so I removed it from this file.