From 1b3611a5a8c5e584a640e17d5dc7deb56f5695fe Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Mon, 19 Aug 2024 13:22:32 +0200 Subject: [PATCH] Maintenance: fix GitHub actions (#425) * Maintenance: fix GitHub actions --- .github/ISSUE_TEMPLATE.md | 2 +- .github/tests.sh | 8 ++++---- .github/workflows/ci-remote-image.yaml | 10 +++++----- .github/workflows/ci.yaml | 5 +++-- README.md | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 72c7cc1e..49018717 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,7 +2,7 @@ Hi there - thanks for filling an issue. Please ensure the following things before creating an issue - thank you! 🤓 - Check the repository. Please only create issue here that concern the Zammad Docker setup. Use the other repositories for other issues. -- Make sure to use the latest version of Zammads Docker containers via: docker-compose pull +- Make sure to use the latest version of Zammad's Docker containers via: docker compose pull - Please write the issue in english * The upper textblock will be removed automatically when you submit your issue * diff --git a/.github/tests.sh b/.github/tests.sh index e75690c1..0aa8f1c1 100755 --- a/.github/tests.sh +++ b/.github/tests.sh @@ -6,7 +6,7 @@ set -o errexit set -o pipefail -docker-compose logs --timestamps --follow & +docker compose logs --timestamps --follow & until (curl -I --silent --fail localhost:8080 | grep -iq "HTTP/1.1 200 OK"); do echo "wait for zammad to be ready..." @@ -21,7 +21,7 @@ echo echo "Execute autowizard..." echo -docker exec --env=AUTOWIZARD_RELATIVE_PATH=tmp/auto_wizard.json --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rake zammad:setup:auto_wizard +docker exec --env=AUTOWIZARD_RELATIVE_PATH=tmp/auto_wizard.json --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose-zammad-railsserver-1 bundle exec rake zammad:setup:auto_wizard echo echo "Autowizard executed successful :)" @@ -32,7 +32,7 @@ echo echo "Check DB for AutoWizard user" echo -docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rails r "p User.find_by(email: 'info@zammad.org')" | grep 'info@zammad.org' +docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose-zammad-railsserver-1 bundle exec rails r "p User.find_by(email: 'info@zammad.org')" | grep 'info@zammad.org' echo echo "Check DB for AutoWizard user successfull :)" @@ -42,7 +42,7 @@ echo echo "Fill DB with some random data" echo -docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)" +docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose-zammad-railsserver-1 bundle exec rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)" echo echo "DB fill successful :)" diff --git a/.github/workflows/ci-remote-image.yaml b/.github/workflows/ci-remote-image.yaml index 6bd9bbab..6883a35f 100644 --- a/.github/workflows/ci-remote-image.yaml +++ b/.github/workflows/ci-remote-image.yaml @@ -14,14 +14,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: pull docker-compose images - run: docker-compose pull + - name: pull docker compose images + run: docker compose pull - - name: run docker-compose up - run: docker-compose up --detach + - name: run docker compose up + run: docker compose up --detach - name: add autowizard file - run: docker cp .github/auto_wizard.json zammad-docker-compose_zammad-railsserver_1:/opt/zammad/tmp + run: docker cp .github/auto_wizard.json zammad-docker-compose-zammad-railsserver-1:/opt/zammad/tmp - name: run tests run: .github/tests.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3a962367..fc6c563d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: lint zammad docker-compose file - run: docker-compose config + - name: lint zammad docker compose file + run: docker compose config super-linter: runs-on: ubuntu-22.04 @@ -32,3 +32,4 @@ jobs: LINTER_RULES_PATH: .github/linters VALIDATE_ALL_CODEBASE: false VALIDATE_JSCPD: false + VALIDATE_SHELL_SHFMT: false diff --git a/README.md b/README.md index 4d3fab8e..96eac71f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ To run Zammad behind a reverse proxy, we provide `docker-compose.proxy-example.y 1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml` `cp ./.examples/proxy/docker-compose.proxy-example.yml ./docker-compose.prod.yml` 2. Modify the environment variable `VIRTUAL_HOST` and the name of the external network in `./docker-compose.prod.yml` to fit your environment. -3. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d` +3. Run docker-composer commands with the default and your configuration, e.g. `docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d` See `.examples/proxy/docker-compose.yml` for an example proxy project.