Skip to content
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

add alternate configuration so "web" images (app.jar) can be loaded in docker #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docker-compose.web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# USAGE: use this configuration for loading the "web" image (with app.jar) as opposed to
# the "web-and-data" image. E.g.
# 'docker compose -f docker-compose.web.yml up'

version: '3'

services:
cbioportal:
restart: unless-stopped
image: ${DOCKER_IMAGE_CBIOPORTAL}
container_name: cbioportal-container
environment:
SHOW_DEBUG_INFO: "true"
PORTAL_HOME: "/cbioportal-webapp"
ports:
- "8080:8080"
volumes:
- ./study:/study/
- ./config/application.properties:/cbioportal-webapp/application.properties:ro
depends_on:
- cbioportal-database
- cbioportal-session
networks:
- cbio-net
# TODO: servlet-api should be excluded from deps in mvn, the removal below is just a quick fix
# This might be helpful: https://stackoverflow.com/questions/36233626
command: /bin/sh -c "rm -rf /cbioportal-webapp/lib/servlet-api-2.5.jar && java -Xms2g -Xmx4g -jar /cbioportal-webapp/app.jar -spring.config.location=cbioportal-webapp/application.properties --authenticate=false --session.service.url=http://cbioportal-session:5000/api/sessions/my_portal/"
cbioportal-database:
restart: unless-stopped
image: ${DOCKER_IMAGE_MYSQL}
container_name: cbioportal-database-container
environment:
MYSQL_DATABASE: cbioportal
MYSQL_USER: cbio_user
MYSQL_PASSWORD: somepassword
MYSQL_ROOT_PASSWORD: somepassword
volumes:
- ./data/cgds.sql:/docker-entrypoint-initdb.d/cgds.sql:ro
- ./data/seed.sql.gz:/docker-entrypoint-initdb.d/seed.sql.gz:ro
- cbioportal_mysql_data:/var/lib/mysql
networks:
- cbio-net
cbioportal-session:
restart: unless-stopped
image: ${DOCKER_IMAGE_SESSION_SERVICE}
container_name: cbioportal-session-container
environment:
SERVER_PORT: 5000
JAVA_OPTS: -Dspring.data.mongodb.uri=mongodb://cbioportal-session-database:27017/session-service
depends_on:
- cbioportal-session-database
networks:
- cbio-net
cbioportal-session-database:
restart: unless-stopped
image: mongo:4.2
container_name: cbioportal-session-database-container
environment:
MONGO_INITDB_DATABASE: session_service
volumes:
- cbioportal_mongo_data:/data/db
networks:
- cbio-net

networks:
cbio-net:

volumes:
cbioportal_mysql_data:
cbioportal_mongo_data: