Skip to content

Commit

Permalink
Add clone and submodule init instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Aug 24, 2023
1 parent 7c58d1b commit cff27be
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions dev/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# How to get started:

## Clone the repo and the submodules

```bash
git clone [email protected]: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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cff27be

Please sign in to comment.