Skip to content

Commit

Permalink
abandon old compose
Browse files Browse the repository at this point in the history
  • Loading branch information
nr23730 committed Oct 8, 2024
1 parent 9e62210 commit 5d5071c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
22 changes: 11 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -222,31 +222,31 @@ 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

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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <service>
sudo docker compose -f compose-dev.yml build <service>
```

Such are marked in the table down below.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion services/cbioportal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5d5071c

Please sign in to comment.