Skip to content

Commit cb2a358

Browse files
Tamas Pallospallost
authored andcommitted
Update the local docker-compose setup
1 parent b293b53 commit cb2a358

2 files changed

Lines changed: 16 additions & 21 deletions

File tree

development.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,12 @@ mkdir -p ./docker
1212
DOCKER_COMPOSE_CMD="docker-compose -f ./docker/docker-compose.yml -f ./docker/docker-compose.custom.yml"
1313

1414
function check_docker {
15-
# compare versions
16-
GITHUB_VERSION=$(curl -L https://github.com/HSLdevcom/jore4-flux/releases/download/e2e-docker-compose/RELEASE_VERSION.txt --silent)
17-
LOCAL_VERSION=$(cat ./docker/RELEASE_VERSION.txt || echo "unknown")
18-
19-
# download latest version of the docker-compose package in case it has changed
20-
if [ "$GITHUB_VERSION" != "$LOCAL_VERSION" ]; then
21-
echo "E2E docker-compose package is not up to date, downloading a new version."
22-
curl -L https://github.com/HSLdevcom/jore4-flux/releases/download/e2e-docker-compose/e2e-docker-compose.tar.gz --silent | tar -xzf - -C ./docker/
23-
else
24-
echo "E2E docker-compose package is up to date, no need to download new version."
25-
fi
15+
curl https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/download-docker-bundle.sh | bash
2616
}
2717

2818
function start {
2919
check_docker
30-
$DOCKER_COMPOSE_CMD up --build -d jore4-hastus
20+
$DOCKER_COMPOSE_CMD up --build -d jore4-hastus jore4-hasura jore4-testdb
3121
}
3222

3323
function stop_all {

docker/docker-compose.custom.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
---
2-
version: "1.0"
2+
version: "3.8"
33
services:
4+
# build and run the local image instead
5+
# note: it's currently expose on port 3008
46
jore4-hastus:
57
build:
68
context: ".."
7-
container_name: hastus
8-
restart: "unless-stopped"
9-
networks:
10-
- jore4
11-
ports:
12-
- "127.0.0.1:3008:8080"
139

14-
networks:
15-
jore4:
10+
jore4-hasura:
11+
# locking hasura image so that we can develop against a static graphql API
12+
# Link to available jore4-hasura images in Docker Hub:
13+
# https://hub.docker.com/r/hsldevcom/jore4-hasura/tags?page=1&ordering=last_updated
14+
# The :seed tag contains the latest main-build image with seed data.
15+
image: 'hsldevcom/jore4-hasura:seed-main--20230315-e9a40861ebd8bb78d777ce18c7a942c5cbdbfd74'
16+
# Waiting for database to be ready to avoid startup delay due to hasura crashing at startup if db is offline
17+
# Note: this should only be done in development setups as Kubernetes does not allow waiting for services to be ready
18+
depends_on:
19+
jore4-testdb:
20+
condition: service_healthy

0 commit comments

Comments
 (0)