-
Notifications
You must be signed in to change notification settings - Fork 6
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
Set up docker for genenetwork #29
base: master
Are you sure you want to change the base?
Changes from 24 commits
f64227a
5a67a7a
a97b231
3d6dc5d
c21fde7
a4b3adf
c0fc4f7
4cb5a38
500b544
14d8eaf
7f7f934
01bf6d4
0c3faab
26a3484
f905fb6
112f739
3d2472e
b3a1a47
72bc6a5
59d5fe5
62ec3fd
cd169d7
ee9f746
e450091
720b580
551f94a
8013ee7
44460b2
acec6fa
a281665
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
npm-debug.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM node:11.9.0 | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY package*.json entrypoint.sh ./ | ||
|
||
# Install any needed packages specified in requirements.txt | ||
RUN npm install | ||
# If you are building your code for production | ||
# RUN npm ci --only=production | ||
|
||
# | ||
|
||
RUN npm build | ||
RUN npm i natives | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
# Make port 80 available to the world outside this container | ||
EXPOSE 80 | ||
|
||
# Fill elasticsearch with entrypoint.sh script | ||
RUN chmod +x entrypoint.sh # if not already executable | ||
ENTRYPOINT ["/app/entrypoint.sh"] | ||
|
||
# Run app.py when the container launches | ||
CMD ["npm", "start"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,12 @@ var dbutil = require('../utils/dbutil') | |
var genedesc = require('../utils/genedesc') | ||
var quicksortobj = require('../utils/quicksortobj') | ||
|
||
var Queue = kue.createQueue() // this does not create a new queue, it's just redis access | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to test if this would break anything There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I change it back? Without this change docker won't work There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks running locally, will investigate how to make it work in both instances |
||
var Queue = kue.createQueue({ | ||
redis:{ | ||
host: 'redis' | ||
} | ||
}) // this does not create a new queue, it's just redis access | ||
|
||
var lastAnalysisRequest = null | ||
var lastAnalysisResult = null | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
domain: 'https://www.genenetwork.nl' | ||
npklein marked this conversation as resolved.
Show resolved
Hide resolved
|
||
domain: '' | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/** | ||
* Local environment settings | ||
* In a production environment, you probably want to leave this file out | ||
* entirely and leave all your settings in env/production.js | ||
*/ | ||
|
||
module.exports = { | ||
|
||
genesToTranscripts: '/app/data/metabrainnetwork/files/genesToTranscripts.txt', | ||
transcriptMappingFile: 'xxx', | ||
mim2gene: '/app/data/metabrainnetwork/files/new/mim2gene.txt', | ||
|
||
geneDescFile: '/app/data/metabrainnetwork/files/new/ENSGToGeneNameHGNCBiotypeChromosomeStartStopStrandAndDescriptionV83FilteredNonChromosomesRemovedDuplicateTranscriptsRemoved.txt', | ||
genePredScoreFile: '/app/data/metabrainnetwork/files/new/skewnessSummary.txt', | ||
geneDBPath: '/app/data/metabrainnetwork/level/new/dbgenes_uint16be', | ||
pathwayDBPath: '/app/data/metabrainnetwork/level/new/dbexternal_uint16be', | ||
|
||
transcriptDBpath: '/app/data/metabrainnetwork/level/new/transcriptdb', | ||
transcriptBarsDBpath: '/app/data/metabrainnetwork/level/new/transcriptbars', | ||
tissuecorrelationDBPath: '/app/data/metabrainnetwork/level/new/tissuedb', | ||
|
||
celltypeDBPath: '/app/data/metabrainnetwork/level/new/celltypedb', | ||
correlationDBPath: '/app/data/metabrainnetwork/level/new/dbpccorrelationzscores_uint16be_genescompsstdnorm', | ||
hpocorrelationDB: '/app/data/metabrainnetwork/level/new/hpocorrelationdb', | ||
//correlationDBPath: '/srv/molgenis/dbpccorrelationzscores_uint16be', | ||
requestDBPath: '/app/data/metabrainnetwork/level/new/dbreq', | ||
networkShortURLDBPath: '/app/data/metabrainnetwork/level/new/dbnetworkurls', | ||
|
||
svgUploadDir: '/app/data/metabrainnetwork/uploads/svg/', | ||
genelistUploadDir: '/app/data/metabrainnetwork/uploads/genelist', | ||
|
||
networkFontFamily: 'Geogrotesque Lg', | ||
networkFontFile: 'assets/fonts/Geogtq-Lg.svg', | ||
|
||
useElastic: true, | ||
elasticHost: 'elasticsearch:9200', | ||
elasticLogLevel: 'debug', | ||
|
||
pubmine: { | ||
journalFile: '/app/data/pubmine/GeneticsJournalsImpactFactorAboveThree.txt', | ||
startYear: 2000, | ||
stopYear: 2014, | ||
impactFactorBins: [3, 5, 10], | ||
numTopJournals: 5 | ||
}, | ||
|
||
/*************************************************************************** | ||
* Your SSL certificate and key, if you want to be able to serve HTTP * | ||
* responses over https:// and/or use websockets over the wss:// protocol * | ||
* (recommended for HTTP, strongly encouraged for WebSockets) * | ||
* * | ||
* In this example, we'll assume you created a folder in your project, * | ||
* `config/ssl` and dumped your certificate/key files there: * | ||
***************************************************************************/ | ||
|
||
// ssl: { | ||
// ca: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl_gd_bundle.crt'), | ||
// key: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl.key'), | ||
// cert: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl.crt') | ||
// }, | ||
|
||
/*************************************************************************** | ||
* The `port` setting determines which TCP port your app will be * | ||
* deployed on. * | ||
* * | ||
* Ports are a transport-layer concept designed to allow many different * | ||
* networking applications run at the same time on a single computer. * | ||
* More about ports: * | ||
* http://en.wikipedia.org/wiki/Port_(computer_networking) * | ||
* * | ||
* By default, if it's set, Sails uses the `PORT` environment variable. * | ||
* Otherwise it falls back to port 1337. * | ||
* * | ||
* In env/production.js, you'll probably want to change this setting * | ||
* to 80 (http://) or 443 (https://) if you have an SSL certificate * | ||
***************************************************************************/ | ||
|
||
port: process.env.PORT || 1337, | ||
|
||
/*************************************************************************** | ||
* The runtime "environment" of your Sails app is either typically * | ||
* 'development' or 'production'. * | ||
* * | ||
* In development, your Sails app will go out of its way to help you * | ||
* (for instance you will receive more descriptive error and * | ||
* debugging output) * | ||
* * | ||
* In production, Sails configures itself (and its dependencies) to * | ||
* optimize performance. You should always put your app in production mode * | ||
* before you deploy it to a server. This helps ensure that your Sails * | ||
* app remains stable, performant, and scalable. * | ||
* * | ||
* By default, Sails sets its environment using the `NODE_ENV` environment * | ||
* variable. If NODE_ENV is not set, Sails will run in the * | ||
* 'development' environment. * | ||
***************************************************************************/ | ||
|
||
environment: process.env.NODE_ENV || 'development', | ||
hookTimeout: 120000 // 2 minutes | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/** | ||
* Local environment settings | ||
* In a production environment, you probably want to leave this file out | ||
* entirely and leave all your settings in env/production.js | ||
*/ | ||
|
||
module.exports = { | ||
|
||
genesToTranscripts: '/data/genenetwork/files/genesToTranscripts.txt', | ||
transcriptMappingFile: 'xxx', | ||
mim2gene: '/data/genenetwork/files/new/mim2gene.txt', | ||
|
||
geneDescFile: '/data/genenetwork/files/new/ENSGToGeneNameHGNCBiotypeChromosomeStartStopStrandAndDescriptionV83FilteredNonChromosomesRemovedDuplicateTranscriptsRemoved.txt', | ||
genePredScoreFile: '/data/genenetwork/files/new/skewnessSummary.txt', | ||
geneDBPath: '/data/genenetwork/level/new/dbgenes_uint16be', | ||
pathwayDBPath: '/data/genenetwork/level/new/dbexternal_uint16be', | ||
|
||
transcriptDBpath: '/data/genenetwork/level/new/transcriptdb', | ||
transcriptBarsDBpath: '/data/genenetwork/level/new/transcriptbars', | ||
tissuecorrelationDBPath: '/data/genenetwork/level/new/tissuedb', | ||
|
||
// geneDescFile: '/data/genenetwork/files/ENSGToGeneNameHGNCBiotypeChromosomeStartStopStrandAndDescriptionV75.txt.filtered.txt', | ||
// geneDBPath: '/data/genenetwork/level/dbgenes_uint16be', | ||
// pathwayDBPath: '/data/genenetwork/level/dbexternal_uint16be', | ||
|
||
celltypeDBPath: '/data/genenetwork/level/new/celltypedb', | ||
correlationDBPath: '/data/genenetwork/level/new/dbpccorrelationzscores_uint16be_genescompsstdnorm', | ||
hpocorrelationDB: '/data/genenetwork/level/new/hpocorrelationdb', | ||
//correlationDBPath: '/srv/molgenis/dbpccorrelationzscores_uint16be', | ||
requestDBPath: '/data/genenetwork/level/new/dbreq', | ||
networkShortURLDBPath: '/data/genenetwork/level/new/dbnetworkurls', | ||
|
||
svgUploadDir: '/data/genenetwork/uploads/svg/', | ||
genelistUploadDir: '/data/genenetwork/uploads/genelist', | ||
|
||
networkFontFamily: 'Geogrotesque Lg', | ||
networkFontFile: 'assets/fonts/Geogtq-Lg.svg', | ||
|
||
useElastic: true, | ||
elasticHost: 'elastichost', | ||
elasticLogLevel: 'debug', | ||
|
||
pubmine: { | ||
journalFile: '/data/pubmine/GeneticsJournalsImpactFactorAboveThree.txt', | ||
startYear: 2000, | ||
stopYear: 2014, | ||
impactFactorBins: [3, 5, 10], | ||
numTopJournals: 5 | ||
}, | ||
|
||
/*************************************************************************** | ||
* Your SSL certificate and key, if you want to be able to serve HTTP * | ||
* responses over https:// and/or use websockets over the wss:// protocol * | ||
* (recommended for HTTP, strongly encouraged for WebSockets) * | ||
* * | ||
* In this example, we'll assume you created a folder in your project, * | ||
* `config/ssl` and dumped your certificate/key files there: * | ||
***************************************************************************/ | ||
|
||
// ssl: { | ||
// ca: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl_gd_bundle.crt'), | ||
// key: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl.key'), | ||
// cert: require('fs').readFileSync(__dirname + './ssl/my_apps_ssl.crt') | ||
// }, | ||
|
||
/*************************************************************************** | ||
* The `port` setting determines which TCP port your app will be * | ||
* deployed on. * | ||
* * | ||
* Ports are a transport-layer concept designed to allow many different * | ||
* networking applications run at the same time on a single computer. * | ||
* More about ports: * | ||
* http://en.wikipedia.org/wiki/Port_(computer_networking) * | ||
* * | ||
* By default, if it's set, Sails uses the `PORT` environment variable. * | ||
* Otherwise it falls back to port 1337. * | ||
* * | ||
* In env/production.js, you'll probably want to change this setting * | ||
* to 80 (http://) or 443 (https://) if you have an SSL certificate * | ||
***************************************************************************/ | ||
|
||
port: process.env.PORT || 1337, | ||
|
||
/*************************************************************************** | ||
* The runtime "environment" of your Sails app is either typically * | ||
* 'development' or 'production'. * | ||
* * | ||
* In development, your Sails app will go out of its way to help you * | ||
* (for instance you will receive more descriptive error and * | ||
* debugging output) * | ||
* * | ||
* In production, Sails configures itself (and its dependencies) to * | ||
* optimize performance. You should always put your app in production mode * | ||
* before you deploy it to a server. This helps ensure that your Sails * | ||
* app remains stable, performant, and scalable. * | ||
* * | ||
* By default, Sails sets its environment using the `NODE_ENV` environment * | ||
* variable. If NODE_ENV is not set, Sails will run in the * | ||
* 'development' environment. * | ||
***************************************************************************/ | ||
|
||
environment: process.env.NODE_ENV || 'development', | ||
hookTimeout: 120000 // 2 minutes | ||
}; |
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.
do not use expose in the dockerfile only specify it in the docker-compose file