Skip to content

Commit

Permalink
Change docker-compose to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
sauravsapkota committed Aug 5, 2024
1 parent f48079e commit bdcbc3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
env:
DOCKER_IMAGE_SERVER: ${{ steps.prep.outputs.tagged_image }}
run: |
docker-compose -f ./gh-docker-compose.yml run --rm server bash -c 'wait-for-it db:5432 && ./manage.py graphql_schema --out /ci-share/schema-latest.graphql' &&
docker compose -f ./gh-docker-compose.yml run --rm server bash -c 'wait-for-it db:5432 && ./manage.py graphql_schema --out /ci-share/schema-latest.graphql' &&
cmp --silent schema.graphql ./ci-share/schema-latest.graphql || {
echo 'The schema.graphql is not up to date with the latest changes. Please update and push latest';
diff schema.graphql ./ci-share/schema-latest.graphql;
Expand All @@ -53,7 +53,7 @@ jobs:
env:
DOCKER_IMAGE_SERVER: ${{ steps.prep.outputs.tagged_image }}
run: |
docker-compose -f ./gh-docker-compose.yml run --rm server bash -c 'wait-for-it db:5432 && ./manage.py makemigrations --check --dry-run' || {
docker compose -f ./gh-docker-compose.yml run --rm server bash -c 'wait-for-it db:5432 && ./manage.py makemigrations --check --dry-run' || {
echo 'There are some changes to be reflected in the migration. Make sure to run makemigrations';
exit 1;
}
Expand All @@ -64,7 +64,7 @@ jobs:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_ID }}
DOCKER_IMAGE_SERVER: ${{ steps.prep.outputs.tagged_image }}
with:
coverageCommand: docker-compose -f gh-docker-compose.yml run --rm server /code/scripts/run_tests.sh
coverageCommand: docker compose -f gh-docker compose.yml run --rm server /code/scripts/run_tests.sh
coverageLocations: |
${{github.workspace}}/coverage/coverage.xml:coverage.py
Expand Down
6 changes: 3 additions & 3 deletions .travis-old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ before_install:

- env > .env
- mv travis-docker-compose.yml docker-compose.yml
- docker-compose pull && docker pull ${DOCKER_IMAGE_SERVER_B} || true
- docker compose pull && docker pull ${DOCKER_IMAGE_SERVER_B} || true
- |
docker build\
--cache-from $(get_image ${DOCKER_IMAGE_SERVER_B} ${DOCKER_IMAGE_SERVER})\
Expand All @@ -24,12 +24,12 @@ before_script:
- /tmp/cc-test-reporter before-build

script:
- docker-compose run server /code/scripts/run_tests.sh
- docker compose run server /code/scripts/run_tests.sh

after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- /tmp/cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- docker-compose push server
- docker compose push server
- docker push ${DOCKER_IMAGE_SERVER_B}

deploy:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Add this to your `.git/hooks/pre-commit` to generate latest graphql schema befor
#!/bin/sh
echo "pre-commit: Generating graphql schema."
if [ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q web)` ]; then
docker-compose run --rm web ./manage.py graphql_schema --out schema.graphql
if [ -z `docker ps -q --no-trunc | grep $(docker compose ps -q web)` ]; then
docker compose run --rm web ./manage.py graphql_schema --out schema.graphql
else
docker-compose exec -T web ./manage.py graphql_schema --out schema.graphql
docker compose exec -T web ./manage.py graphql_schema --out schema.graphql
fi
```
FYI: If hooks aren't working https://stackoverflow.com/questions/49912695/git-pre-and-post-commit-hooks-not-running

0 comments on commit bdcbc3a

Please sign in to comment.