-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into snyk-fix-66646c6d6d40244903616a664e35a8c4
- Loading branch information
Showing
379 changed files
with
24,295 additions
and
7,588 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Integration Tests | ||
|
||
on: pull_request | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
integration_tests: | ||
name: Integration tests | ||
uses: uc-cdis/.github/.github/workflows/integration_tests.yaml@master | ||
with: | ||
SERVICE_TO_TEST: portal | ||
secrets: | ||
CI_AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_ACCESS_KEY_ID }} | ||
CI_AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_SECRET_ACCESS_KEY }} | ||
JENKINS_API_TOKEN: ${{ secrets.JENKINS_API_TOKEN }} | ||
QA_DASHBOARD_S3_PATH: ${{ secrets.QA_DASHBOARD_S3_PATH }} | ||
CI_TEST_ORCID_USERID: ${{ secrets.CI_TEST_ORCID_USERID }} | ||
CI_TEST_ORCID_PASSWORD: ${{ secrets.CI_TEST_ORCID_PASSWORD }} | ||
CI_TEST_RAS_USERID: ${{ secrets.CI_TEST_RAS_USERID }} | ||
CI_TEST_RAS_PASSWORD: ${{ secrets.CI_TEST_RAS_PASSWORD }} | ||
CI_TEST_RAS_2_USERID: ${{ secrets.CI_TEST_RAS_2_USERID }} | ||
CI_TEST_RAS_2_PASSWORD: ${{ secrets.CI_TEST_RAS_2_PASSWORD }} | ||
CI_SLACK_BOT_TOKEN: ${{ secrets.CI_SLACK_BOT_TOKEN }} | ||
CI_SLACK_CHANNEL_ID: ${{ secrets.CI_SLACK_CHANNEL_ID }} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
16 |
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 |
---|---|---|
@@ -1,40 +1,45 @@ | ||
# To run: docker run -d --name=dataportal -p 80:80 quay.io/cdis/data-portal | ||
# To check running container: docker exec -it dataportal /bin/bash | ||
|
||
FROM quay.io/cdis/ubuntu:20.04 | ||
FROM quay.io/cdis/nodejs-base:master | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV REACT_APP_PROJECT_ID=search | ||
|
||
# disable npm 7's brand new update notifier to prevent Portal from stuck at starting up | ||
# see https://github.com/npm/cli/issues/3163 | ||
ENV NPM_CONFIG_UPDATE_NOTIFIER=false | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libssl1.1 \ | ||
libgnutls30 \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
nginx \ | ||
python3 \ | ||
time \ | ||
vim \ | ||
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \ | ||
&& apt-get install -y --no-install-recommends nodejs \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
&& npm install -g [email protected] | ||
# Install nginx | ||
RUN yum install nginx -y && \ | ||
# allows nginx to run on port 80 without being root user | ||
setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx && \ | ||
chown -R gen3:gen3 /var/log/nginx && \ | ||
# pipe nginx logs to stdout/stderr | ||
ln -sf /dev/stdout /var/log/nginx/access.log && \ | ||
ln -sf /dev/stderr /var/log/nginx/error.log && \ | ||
mkdir -p /var/lib/nginx/tmp/client_body && \ | ||
chown -R gen3:gen3 /var/lib/nginx/ && \ | ||
mkdir -p /var/cache/nginx && \ | ||
chown -R gen3:gen3 /var/cache/nginx \ | ||
&& touch /var/run/nginx.pid \ | ||
&& chown -R gen3:gen3 /var/run/nginx.pid | ||
|
||
ARG APP=dev | ||
ARG BASENAME | ||
|
||
RUN mkdir -p /data-portal | ||
COPY . /data-portal | ||
RUN cp /data-portal/nginx.conf /etc/nginx/conf.d/nginx.conf \ | ||
&& chown -R gen3:gen3 /etc/nginx/conf.d \ | ||
&& chown -R gen3:gen3 /data-portal | ||
|
||
# In standard prod these will be overwritten by volume mounts | ||
# Provided here for ease of use in development and | ||
# non-standard deployment environments | ||
|
||
RUN mkdir /mnt/ssl \ | ||
&& openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /mnt/ssl/nginx.key -out /mnt/ssl/nginx.crt -subj '/countryName=US/stateOrProvinceName=Illinois/localityName=Chicago/organizationName=CDIS/organizationalUnitName=PlanX/commonName=localhost/[email protected]' \ | ||
&& chmod 755 /mnt/ssl/nginx.crt \ | ||
&& chmod 755 /mnt/ssl/nginx.key | ||
|
||
WORKDIR /data-portal | ||
USER gen3 | ||
RUN COMMIT=`git rev-parse HEAD` && echo "export const portalCommit = \"${COMMIT}\";" >src/versions.js \ | ||
&& VERSION=`git describe --always --tags` && echo "export const portalVersion =\"${VERSION}\";" >>src/versions.js \ | ||
&& /bin/rm -rf .git \ | ||
|
@@ -44,15 +49,6 @@ RUN npm config set unsafe-perm=true \ | |
&& npm run relay \ | ||
&& npm run params | ||
# see https://stackoverflow.com/questions/48387040/nodejs-recommended-max-old-space-size | ||
RUN NODE_OPTIONS=--max-old-space-size=3584 NODE_ENV=production time npx webpack build | ||
RUN cp nginx.conf /etc/nginx/conf.d/nginx.conf \ | ||
&& rm /etc/nginx/sites-enabled/default | ||
|
||
# In standard prod these will be overwritten by volume mounts | ||
# Provided here for ease of use in development and | ||
# non-standard deployment environments | ||
|
||
RUN mkdir /mnt/ssl \ | ||
&& openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /mnt/ssl/nginx.key -out /mnt/ssl/nginx.crt -subj '/countryName=US/stateOrProvinceName=Illinois/localityName=Chicago/organizationName=CDIS/organizationalUnitName=PlanX/commonName=localhost/[email protected]' | ||
RUN NODE_OPTIONS=--max-old-space-size=3584 NODE_ENV=production npx webpack build | ||
|
||
CMD bash ./dockerStart.sh | ||
CMD [ "bash", "./dockerStart.sh" ] |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.