forked from ncats/stitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (32 loc) · 1.95 KB
/
Dockerfile
File metadata and controls
43 lines (32 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM openjdk:8-jdk as buildContainer
RUN mkdir /opt/app
COPY ./stitcher /opt/app
RUN mkdir /opt/stitcher-data-inxight
COPY ./stitcher-data-inxight /opt/stitcher-data-inxight
WORKDIR "/opt/app"
RUN apt update
RUN apt-get update
RUN apt-get install sudo
RUN apt-get install nano
RUN sudo apt-get install zip
RUN apt-get install apt-transport-https curl gnupg -yqq
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
RUN chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
RUN sudo apt-get install pip -y
RUN sudo pip install requests
RUN apt-get update
RUN apt-get install sbt
EXPOSE 9003
RUN echo "-J-Xms2048M -J-Xmx32G -J-Xss1024M -J-XX:+CMSClassUnloadingEnabled -J-XX:+UseConcMarkSweepGC -J-XX:+HeapDumpOnOutOfMemoryError -J-XX:HeapDumpPath=./heapdump.hprof" > .sbtopts
RUN ./scripts/stitching/stitch-all-current.sh | sudo tee /opt/app/stitch.log
RUN unzip -o scripts/deployment/*zip
RUN chmod +x ./scripts/deployment/restart-stitcher-from-repo.sh
CMD cp -r $(ls -d /opt/app/stitchv*.db) /opt/app/apiDB/; \
rm -rf /opt/app/browserDB/*; \
cp -r /opt/app/apiDB/$(basename /opt/app/stitchv*.db) /opt/app/browserDB/graph.db; \
./scripts/deployment/restart-stitcher-from-repo.sh /opt/app/apiDB/$(basename /opt/app/stitchv*.db);
# python3 scripts/stitcher-curation/dumpCurations.py prod --outfile scripts/stitcher-curation/dbCurations-{date}.txt
# python3 scripts/stitcher-curation/applyCurations.py dev --filename scripts/stitcher-curation/dbCurations-{date}.txt
# python3 scripts/stitcher-curation/applyCurations.py docker --filename scripts/stitcher-curation/dbCurations-2023-02-13.txt