Skip to content

Commit

Permalink
Merge pull request #1375 from camptocamp/backport/1369-to-prod-2-8-ad…
Browse files Browse the repository at this point in the history
…vance

[Backport prod-2-8-advance] Use Docker Compose version 2
  • Loading branch information
sbrunner authored Aug 7, 2024
2 parents 6b6fa99 + e89fb73 commit 0db21f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- run: rm env.secrets
- run: touch env.secrets
- name: Build
run: ./build --no-pull
run: ./build --docker-compose-version-2 --no-pull

- name: Publish
run: c2cciutils-publish
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ checks: prospector eslint ## Runs the checks

.PHONY: prospector
prospector: ## Runs the Prospector checks
docker-compose run --entrypoint= --no-deps --rm --volume=$(CURDIR)/geoportal:/app geoportal \
docker compose run --entrypoint= --rm --volume=$(CURDIR)/geoportal:/app geoportal \
prospector --output-format=pylint --die-on-tool-error

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

.PHONY: build
Expand Down Expand Up @@ -68,12 +68,13 @@ acceptance-init: ## Initialize the acceptance tests
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 \
scripts/db-restore --docker-compose-version-2 --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

.PHONY: acceptance
acceptance: ## Run the acceptance tests
sleep 1
docker compose exec -T tools pytest -vv tests/
ci/docker-compose-check

Expand Down

0 comments on commit 0db21f5

Please sign in to comment.