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

Use docker compose v2 #1269

Merged
merged 1 commit into from
Jun 19, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
if: always()

- run:
docker-compose --file=docker-compose.yaml --file=docker-compose-db.yaml --file=docker-compose.override.sample.yaml
docker compose --file=docker-compose.yaml --file=docker-compose-db.yaml --file=docker-compose.override.sample.yaml
up -d
- name: Run the acceptance tests on dev
run: make acceptance
Expand Down
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,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: ## Update the po files from the running composition
docker-compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make --directory=geoportal update-po"
docker compose exec -T tools sh -c "USER_ID=`id --user` GROUP_ID=`id --group` make --directory=geoportal update-po"

.PHONY: checks
checks: prospector eslint ## Runs the checks
Expand All @@ -32,9 +32,9 @@ prospector: ## Runs the Prospector checks

.PHONY: eslint
eslint: ## Runs the eslint checks
docker-compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
eslint $(find geomapfish -type f -name '*.js' -print 2> /dev/null)
docker-compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
docker compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
eslint $(find geomapfish -type f -name '*.ts' -print 2> /dev/null)

.PHONY: build
Expand All @@ -43,7 +43,7 @@ build:

.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

secrets.tar.bz2.gpg: env.secrets secrets.md ## Encrypt the secrets for committing changes
tar -jcf secrets.tar.bz2 $^
Expand All @@ -63,22 +63,22 @@ secrets: ## Decrypt the secrets.tar.bz2.gpg file
acceptance-init: ## Initialize the acceptance tests
cat env.acceptance-test >> .env
docker volume rm demo_postgresql_data || true
docker-compose --file=docker-compose.yaml --file=docker-compose-db.yaml up -d db tools
docker-compose exec -T tools 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'
docker compose --file=docker-compose.yaml --file=docker-compose-db.yaml up -d db tools
docker compose exec -T tools 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 --arg=--no-privileges --arg=--no-owner $(DUMP_FILE)
docker-compose --file=docker-compose.yaml --file=docker-compose-db.yaml up -d
docker compose --file=docker-compose.yaml --file=docker-compose-db.yaml up -d

.PHONY: acceptance
acceptance: ## Run the acceptance tests
docker-compose exec -T tools pytest -vv tests/
docker compose exec -T tools pytest -vv 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/
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
Loading