Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initialisation of devconf core #30

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

@pablothedude pablothedude Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@quartje is it possible to do this in order to be able to push from Manage to EB and don't get an exception in Manage?
Or is this the wrong way to achieve this?
And should I for example add php to the docker-compose services that already have oidc as proffile? Becuase I don't fully understand why I need oidc in order to push from Manage to Engine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manage pushes to both oidc and eb. This would fix that issue.
In an ideal world, Manage would be configured dynamically (so --profile php would config manage only to push to eb, not to oidc).

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
Loading