From cff27beb0a8b4466616e9b3da0a9aac392d57c3c Mon Sep 17 00:00:00 2001 From: minottic Date: Thu, 24 Aug 2023 15:20:49 +0200 Subject: [PATCH] Add clone and submodule init instructions --- dev/README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dev/README.md b/dev/README.md index e444b09..52a7512 100644 --- a/dev/README.md +++ b/dev/README.md @@ -1,5 +1,17 @@ # How to get started: +## Clone the repo and the submodules + +```bash +git clone git@github.com:paulscherrerinstitute/scicat-ci.git +git submodule update --recursive --init +``` + +## Run docker-compose + +### :warning: IMPORTANT +The docker-compose builds the containers from the Dockerfile of each submodule, thus using the submodule checked out to a particular commit. To build a container basing it on a different commit, e.g. the latest on main, one has to checkout first the submodule to the commit (or branch) of interest. + Build the docker containers with the suitable [profiles](https://docs.docker.com/compose/profiles/): ```bash @@ -9,11 +21,11 @@ docker-compose -f docker-compose.yaml up -d --force-recreate --build --no-deps All the application containers (excluding the db -mongo- and the db_seeding -mongo_seed-) are meant to be used for development so docker-compose starts, rather the applications, environments where the development environment of each applications is set up. This means that, to run the application, one has to attach to the container and start it. -## Example +### Example Here are covered the two most common use case, spinning up the backend and fronted; the new backend and the frontend. -### BE and FE +#### BE and FE 1. Export the COMPOSE_PROFILES: ```bash @@ -26,7 +38,7 @@ docker-compose -f docker-compose.yaml up --force-recreate --build --no-deps -d This will start four containers: the be container, the fe one, the mongodb database and a short lived one, called mongodb_seed_be that puts some example data into the be db of mongo. -### New BE and FE +#### New BE and FE 1. Export the COMPOSE_PROFILES: ```bash