Skip to content

Commit

Permalink
Partially use docker compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 28, 2024
1 parent a936386 commit 6c17e0e
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ update-po-from-url: ## Update the po files from the URL provide by PROJECT_PUBLI
curl --fail --retry 5 --retry-delay 1 \
$(PROJECT_PUBLIC_URL)locale.pot > geoportal/${PACKAGE}_geoportal/locale/${PACKAGE}_geoportal-client${SUFFIX}.pot
sed -i '/^"POT-Creation-Date: /d' geoportal/${PACKAGE}_geoportal/locale/${PACKAGE}_geoportal-client${SUFFIX}.pot
docker-compose run --rm -T tools update-po-only `id --user` `id --group` $(LANGUAGES)
docker compose run --rm -T tools update-po-only `id --user` `id --group` $(LANGUAGES)

.PHONY: update-po
update-po:
docker-compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make -C geoportal update-po"
docker compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make -C geoportal update-po"

.PHONY: build
build:
Expand All @@ -33,27 +33,26 @@ secrets:

.PHONY: qgis
qgis: ## Run QGIS desktop
docker-compose -f docker-compose.yaml -f docker-compose-qgis.yaml run --rm qgis
docker compose -f docker compose.yaml -f docker compose-qgis.yaml run --rm qgis

.PHONY: acceptance-init
acceptance-init:
docker-compose --file=docker-compose.yaml --file=docker-compose-db.yaml up -d
docker-compose exec -T geoportal wait-db
docker-compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS postgis'
docker-compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS pg_trgm'
docker-compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS hstore'
scripts/db-restore --docker-compose-file=docker-compose.yaml --docker-compose-file=docker-compose-db.yaml \
docker compose --file=docker compose.yaml --file=docker compose-db.yaml up -d
docker compose exec -T geoportal wait-db
docker compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS postgis'
docker compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS pg_trgm'
docker compose exec -T tools psql --command='CREATE EXTENSION IF NOT EXISTS hstore'
scripts/db-restore --docker compose-file=docker compose.yaml --docker compose-file=docker compose-db.yaml \
--arg=--clean --arg=--if-exists --arg=--verbose data/prod-2-7.dump
docker-compose restart geoportal alembic
docker-compose exec -T geoportal wait-db
docker compose restart geoportal alembic
docker compose exec -T geoportal wait-db

.PHONY: acceptance
acceptance:
docker-compose exec -T tools pytest tests/
ci/docker-compose-check
docker compose exec -T tools pytest tests/
ci/docker compose-check

.PHONY: acceptance-dev
acceptance-dev:
docker-compose --file=docker-compose.yaml --file=docker-compose-db.yaml --file=docker-compose.override.sample.yaml up -d
docker-compose exec -T tools pytest tests/
ci/docker-compose-check
docker compose --file=docker compose.yaml --file=docker compose-db.yaml --file=docker compose.override.sample.yaml up -d
docker compose exec -T tools pytest tests/
ci/docker compose-check

0 comments on commit 6c17e0e

Please sign in to comment.