Skip to content

Commit

Permalink
Remove explicit call to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire committed Nov 27, 2024
1 parent 61fa8ac commit ace7c92
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
run: |
echo Docker version
docker --version
docker-compose --version
echo
echo Env
env
Expand Down Expand Up @@ -60,11 +59,11 @@ jobs:
tags: |
ghcr.io/sillsdev/appbuilder-buildengine-api:${{ steps.branch.outputs.DockerTag }}
context: .

- name: Clean up older packages
uses: actions/delete-package-versions@v4
with:
package-name: 'appbuilder-buildengine-api'
package-type: 'container'
package-name: "appbuilder-buildengine-api"
package-type: "container"
min-versions-to-keep: 6
delete-only-untagged-versions: 'true'
delete-only-untagged-versions: "true"
36 changes: 18 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
start: app

test: clean testSh composer rmTestDb upTestDb yiimigratetestDb rmTestDb
docker-compose run --rm cli bash -c 'MYSQL_HOST=testDb MYSQL_DATABASE=test ./vendor/bin/codecept --debug run unit'
docker compose run --rm cli bash -c 'MYSQL_HOST=testDb MYSQL_DATABASE=test ./vendor/bin/codecept --debug run unit'

testSh:
shellcheck application/console/views/cron/scripts/upload/default/*.sh

app: upDb composer yiimigrate adminer
docker-compose up -d cron web
docker compose up -d cron web

composer:
docker-compose run --rm --user="0:0" cli composer install
docker compose run --rm --user="0:0" cli composer install

composerupdate:
docker-compose run --rm --user="0:0" cli composer update
docker compose run --rm --user="0:0" cli composer update

cli:
docker-compose run --rm --user="0:0" cli bash
docker compose run --rm --user="0:0" cli bash

rmDb:
docker-compose kill db
docker-compose rm -f db
docker compose kill db
docker compose rm -f db

upDb:
docker-compose up -d db
docker compose up -d db

yiimigrate:
docker-compose run --rm cli whenavail db 3306 100 ./yii migrate --interactive=0
docker compose run --rm cli whenavail db 3306 100 ./yii migrate --interactive=0

basemodels:
docker-compose run --rm cli whenavail db 3306 100 ./rebuildbasemodels.sh
docker compose run --rm cli whenavail db 3306 100 ./rebuildbasemodels.sh

yiimigratetestDb:
docker-compose run --rm cli bash -c 'MYSQL_HOST=testDb MYSQL_DATABASE=test whenavail testDb 3306 100 ./yii migrate --interactive=0'
docker compose run --rm cli bash -c 'MYSQL_HOST=testDb MYSQL_DATABASE=test whenavail testDb 3306 100 ./yii migrate --interactive=0'

rmTestDb:
docker-compose kill testDb
docker-compose rm -f testDb
docker compose kill testDb
docker compose rm -f testDb

upTestDb:
docker-compose up -d testDb
docker compose up -d testDb

bounce:
docker-compose up -d cron web
docker compose up -d cron web

clean:
docker-compose kill
docker-compose rm -f
docker compose kill
docker compose rm -f

cleanVolumes:
docker volume rm `docker volume ls -qf dangling=true`

adminer:
docker-compose up -d adminer
docker compose up -d adminer

0 comments on commit ace7c92

Please sign in to comment.