From 5d5071ccaf42865ccd07ff6608d4d0a034a6bee6 Mon Sep 17 00:00:00 2001 From: Niklas Reimer Date: Tue, 8 Oct 2024 13:33:37 +0200 Subject: [PATCH] abandon old compose --- INSTALL.md | 22 +++++++++++----------- README.md | 10 +++++----- services/cbioportal/Dockerfile | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 4d0bfb9..ace94da 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -6,7 +6,7 @@ - 4 CPU cores - 10 GB of RAM - 100GB of free disk space -2. A container environment like Docker or Podman with support for Compose V3 (e.g. through `docker-compose`, `podman-compose`, etc.) +2. A container environment like Docker or Podman with support for Compose V3 (e.g. through `docker compose`, `podman-compose`, etc.) The following steps will assume the usage of Docker without an explicitly stated `sudo` command. @@ -50,13 +50,13 @@ Please set the password for the databases **now** in the `.env` file. They will ### 3. Initialize config files ``` -docker-compose -f init.yml run --rm cbioportal +docker compose -f init.yml run --rm cbioportal ``` for a network without proxy and ``` -docker-compose -f init.yml run --rm -e https_proxy=http://proxyurl:port cbioportal +docker compose -f init.yml run --rm -e https_proxy=http://proxyurl:port cbioportal ``` for a network with proxy. @@ -68,13 +68,13 @@ This will download the SQL files to initalize the cBioPortal database and also i Now start MTB-cBioPortal. ``` -docker-compose up -d +docker compose up -d ``` If the system is limited in I/O capabilities, a timeout might occur. This timeout can be increased by using ``` -COMPOSE_HTTP_TIMEOUT=200 docker-compose up -d +COMPOSE_HTTP_TIMEOUT=200 docker compose up -d ``` After the command is complete it should be possible to access cBioPortal on your machine using the webbrowser on the previously specified port. @@ -85,7 +85,7 @@ When using a remote machine and a rootless container environment like Podman, it To import one of the provided test data sets use the following command ``` -docker-compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/testpatient -o +docker compose exec cbioportal metaImport.py -u http://cbioportal:8080 -s study/testpatient -o ``` The adress here doesn't require any change, as it's being called from inside the container. @@ -222,18 +222,18 @@ DATA_ACCESS_TOKEN=oauth2 Shut down all services using ``` -docker-compose down +docker compose down ``` Run the initialization command again, as it will add the Keycloak certificate to the trusted castore for cBioPortal. ``` -docker-compose -f init.yml run --rm cbioportal +docker compose -f init.yml run --rm cbioportal ``` After that start cBioPortal again using ``` -docker-compose up -d +docker compose up -d ``` ### 3. Dumping portal info @@ -241,12 +241,12 @@ docker-compose up -d The import process contains checks against available datasources in cBioPortal. As the enabled authentication blocks direct API access the required data must be exported to disk. For this use the following command ``` -docker-compose exec cbioportal bash /cbioportal/dumpPortalInfo.sh +docker compose exec cbioportal bash /cbioportal/dumpPortalInfo.sh ``` Importing data must now use the provided portalinfo. The updated import command looks like this ``` -docker-compose exec cbioportal metaImport.py -p /cbioportal/portalinfo -s study/patient_example -o +docker compose exec cbioportal metaImport.py -p /cbioportal/portalinfo -s study/patient_example -o ``` ## Troubleshooting diff --git a/README.md b/README.md index b6f0987..409d2f8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Installation is described [here](./INSTALL.md) All images with a `ghcr.io/buschlab/` prefix can be rebuilt using the following command: ``` -sudo docker-compose -f compose-dev.yml build +sudo docker compose -f compose-dev.yml build ``` Such are marked in the table down below. @@ -22,16 +22,16 @@ When upgrading MTB-cBioPortal we *highly* suggest that you purge all volumes as The only part that needs a database backup is the HAPI FHIR server. For that please follow these steps: -1. Make a Backup of the HAPI FHIR database using `sudo docker-compose exec hapi-postgres pg_dumpall -U hapiserver > dump.sql` +1. Make a Backup of the HAPI FHIR database using `sudo docker compose exec hapi-postgres pg_dumpall -U hapiserver > dump.sql` 2. Extract the *hapi* database using `sed '/\\connect hapi/,$!d' dump.sql > dump_hapi.sql` 3. Verify that the newly created `dump_hapi.sql` file looks alright. 4. Move the files `dump.sql` and `dump_hapi.sql` as well the directories `reports` and `study`to a different location. -4. Stop all services of MIRMTBACUM-cbioportal using `docker-compose down -v` **This will permanently delete all volume data, so you now rely on the backup you created in step 1!** +4. Stop all services of MIRMTBACUM-cbioportal using `docker compose down -v` **This will permanently delete all volume data, so you now rely on the backup you created in step 1!** 5. Delete the MTB-cbioportal directory and make a fresh clone of the git repository using `git clone https://github.com/buschlab/MTB-cbioportal.git` 6. Copy dump.sql and dump_hapi.sql to the MTB-cbioportal directory -7. Start the Postgres database using `docker-compose up -d hapi-postgres` +7. Start the Postgres database using `docker compose up -d hapi-postgres` 8. Import the `dump_hapi.sql` using the following command -`docker-compose exec -T hapi-postgres psql -U hapiserver -d hapi < dump_hapi.sql` +`docker compose exec -T hapi-postgres psql -U hapiserver -d hapi < dump_hapi.sql` 9. Proceed with step 2 of the installation as shown in [INSTALL.md](./INSTALL.md) ## Components diff --git a/services/cbioportal/Dockerfile b/services/cbioportal/Dockerfile index 42f8dd6..6281e22 100644 --- a/services/cbioportal/Dockerfile +++ b/services/cbioportal/Dockerfile @@ -94,7 +94,7 @@ COPY --from=build ${DEPENDENCY}/BOOT-INF/classes $PORTAL_WEB_HOME/ # add entrypoint COPY --from=build /cbioportal/docker/web-and-data/docker-entrypoint.sh /usr/local/bin/ -# script for calling dumpPortalInfo.py from docker-compose +# script for calling dumpPortalInfo.py from docker compose RUN echo "cd /core/scripts && ./dumpPortalInfo.pl /cbioportal/portalinfo" >> /cbioportal/dumpPortalInfo.sh RUN chmod +x /cbioportal/dumpPortalInfo.sh