diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..35f24c6 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,23 @@ +name: CI Services + +on: + pull_request: + branches: + - main + paths-ignore: + - ".github/**" + - ".makefiles/**" + +concurrency: + group: ci-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + docker-build: + name: Docker build + uses: ./.github/workflows/docker-build.yaml + secrets: inherit + with: + folder: . + image_name: hortusfox-web + push: false diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..2375f98 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,23 @@ +name: Docker + +on: + push: + branches: + - main + paths-ignore: + - ".github/**" + - ".makefiles/**" + +concurrency: + group: ci-${{ github.ref_name }} + cancel-in-progress: true + +jobs: + docker-build: + name: Docker build + uses: ./.github/workflows/docker-build.yaml + secrets: inherit + with: + folder: . + image_name: hortusfox-web + push: true diff --git a/.github/workflows/publish-ghcr.yaml b/.github/workflows/publish-ghcr.yaml deleted file mode 100644 index 1f910a0..0000000 --- a/.github/workflows/publish-ghcr.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Docker Image CI for GHCR - -on: - push: - tags: ['v[0-9]+.[0-9]+'] - -jobs: - build_and_publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build and push the image - run: | - docker login --username danielbrendel --password ${{ secrets.GH_CONTAINER_REGISTRY }} ghcr.io - docker build . --tag ghcr.io/danielbrendel/hortusfox-web:latest - docker push ghcr.io/danielbrendel/hortusfox-web:latest \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3abb594..195806c 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -69,7 +69,7 @@ create_environment_file() { DB_DATABASE="$DB_DATABASE" DB_DRIVER=mysql DB_CHARSET="$DB_CHARSET" - + # SMTP Settings SMTP_FROMNAME="$SMTP_FROMNAME" SMTP_FROMADDRESS="$SMTP_FROMADDRESS" @@ -132,7 +132,7 @@ set_apache_server_name() { # Function to check DB connection check_db() { - mysql -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" -D "$DB_DATABASE" -N -s -e "SELECT 1;" > /dev/null 2>&1 + mysql -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" -D "$DB_DATABASE" -N -s -e "SELECT 1;" } # Function to wait for the database