Skip to content

Commit

Permalink
Merge pull request #1369 from camptocamp/docker-compose
Browse files Browse the repository at this point in the history
Use Docker Compose version 2
  • Loading branch information
sbrunner authored Aug 7, 2024
2 parents 2f3e10d + 014943c commit eca5f1c
Show file tree
Hide file tree
Showing 3 changed files with 7 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 @@ -72,7 +72,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
1 change: 1 addition & 0 deletions custom/custom/alembic/env.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pyramid bootstrap environment. """

from alembic import context
from custom.models.meta import Base
from pyramid.paster import get_appsettings, setup_logging
Expand Down

0 comments on commit eca5f1c

Please sign in to comment.