Skip to content

Commit

Permalink
fix(dev_build): ⚡ Add network po-default before build in make dev
Browse files Browse the repository at this point in the history
It appeared the po-default network creation comes too late in the make dev pipeline, leading to an error with init-elasticsearch. Create po-default network is added at the beginning of the pipeline instead..
  • Loading branch information
jeremyarancio authored and raphael0202 committed Aug 20, 2024
1 parent 8251082 commit c99b2c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ goodbye:
#-------#
# Local #
#-------#
dev: hello build init-elasticsearch migrate-db up create_external_networks
dev: hello create-po-default-network build init-elasticsearch migrate-db up create_external_networks
@echo "🥫 You should be able to access your local install of Robotoff at http://localhost:5500"

edit_etc_hosts:
Expand All @@ -53,7 +53,6 @@ edit_etc_hosts:
up:
# creates a docker network and runs docker-compose
@echo "🥫 Building and starting containers …"
docker network create po_default || true
ifdef service
${DOCKER_COMPOSE} up -d ${service} 2>&1
else
Expand Down Expand Up @@ -285,4 +284,8 @@ migrate-db:
${DOCKER_COMPOSE} run --rm --no-deps api python -m robotoff migrate-db

create-migration: guard-args
${DOCKER_COMPOSE} run --rm --no-deps api python -m robotoff create-migration ${args}
${DOCKER_COMPOSE} run --rm --no-deps api python -m robotoff create-migration ${args}

# create network if not exists
create-po-default-network:
docker network create po_default || true

0 comments on commit c99b2c1

Please sign in to comment.