Skip to content

Commit

Permalink
Merge pull request #30 from OpenConext/bugfix/fix-initial-initialisation
Browse files Browse the repository at this point in the history
Fix initialisation of devconf core
  • Loading branch information
pablothedude authored Jan 20, 2025
2 parents 23e2188 + b989625 commit 98e9f7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
14 changes: 8 additions & 6 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ This repo contains a docker compose and some configuration to get you started wi

## Getting started

To get all services up and running you must have docker compose installed. Enter this command to get things up and running:
### The first time
If you are doing this for the first time, you need to run a script to seed the environment:

```
docker compose up -d
./scripts/init.sh
```

If you are doing this for the first time, you need to run a script to seed the environment:
### After initialisation
To get all services up and running you must have docker compose installed. Enter this command to get things up and running:

```
./scripts/init.sh
docker compose up -d
```

You will also need to tell your local machine where to find the hosts.
You will also need to tell your local machine where to find the hosts.
Add the following line in your hosts file (/etc/hosts )
```
127.0.0.1 engine.dev.openconext.local manage.dev.openconext.local profile.dev.openconext.local engine-api.dev.openconext.local mujina-idp.dev.openconext.local profile.dev.openconext.local connect.dev.openconext.local teams.dev.openconext.local voot.dev.openconext.local pdp.dev.openconext.local invite.dev.openconext.local welcome.dev.openconext.local
Expand All @@ -36,7 +38,7 @@ docker compose --profile oidc down

### Loadbalancer and databases
|name |function |
| --- | --- |
| --- | --- |
|haproxy | loadbalancer |
|mongo |Mongo database for oidc and manage |
|mariadb |MariaDB databases for engine and teams |
Expand Down
5 changes: 3 additions & 2 deletions core/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ services:
coreconextdev:
healthcheck:
test: ["CMD", "curl", "--fail", "-s", "http://localhost/health"]
timeout: 5s
retries: 10
interval: 10s
timeout: 10s
retries: 20
hostname: engine.docker
extra_hosts:
- "host.docker.internal:host-gateway"
Expand Down
8 changes: 4 additions & 4 deletions core/start-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ while true; do
# Use docker compose to start the environment but with the modified override file(s)
echo -e "\nStarting the ${MODE} environment with the following command:\n"

echo -e "docker compose --profile php -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up -d "${@:$number_of_dev_envs}"\n"
docker compose --profile php -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up -d "${@:$number_of_dev_envs}"
echo -e "docker compose --profile oidc -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up -d "${@:$number_of_dev_envs}"\n"
docker compose --profile oidc -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up -d "${@:$number_of_dev_envs}"
break
;;
*)
# Use docker compose to start the environment but with the modified override file(s)
echo -e "Starting the ${MODE} environment with the following command:\n"

echo -e "docker compose -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up "${@:$number_of_dev_envs}"\n"
docker compose --profile php -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up "${@:$number_of_dev_envs}"
echo -e "docker compose --profile oidc -f docker-compose.yml "${docker_compose_args[@]}" "${extra_compose_args}" up "${@:$number_of_dev_envs}"\n"
docker compose --profile oidc -f docker-compose.yml ${docker_compose_args[@]} ${extra_compose_args} up "${@:$number_of_dev_envs}"
break
;;
esac
Expand Down

0 comments on commit 98e9f7c

Please sign in to comment.