From 53e295ae3a5149c61a46e0da5a4131ff649040d2 Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Fri, 10 Jan 2025 15:24:30 +0100 Subject: [PATCH 1/5] add workflow and docker file --- .gitea/workflows/build.yaml | 23 +++++++++++++++++++++++ .idea/.gitignore | 8 ++++++++ Dockerfile | 19 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 .idea/.gitignore create mode 100644 Dockerfile diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..2afd8f4 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,23 @@ +name: build +on: + pull_request: + types: + - closed + branches: + - main +jobs: + build: + runs-on: remote + steps: + - uses: https://git.simonis.lol/actions/checkout@v4 + - uses: https://git.simonis.lol/actions/login@v1 + with: + registry: git.simonis.lol + username: ${{ vars.DOCKER_USER }} + password: ${{ vars.DOCKER_PW }} + + - name: build + run: docker build -t git.simonis.lol/sites/abiball:latest . + + - name: push + run: docker push git.simonis.lol/sites/abiball:latest diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8382afe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.2-apache + +COPY . /var/www/html/ + +RUN chown -R www-data:www-data /var/www/html + +RUN apt-get update \ + && apt-get install -qq -y --no-install-recommends cron nano locales coreutils libicu-dev libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev; + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen + +RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && \ + mv composer.phar /usr/local/bin/composer + +RUN docker-php-ext-install pdo pdo_mysql mysqli gd opcache intl zip calendar dom mbstring zip gd xsl && a2enmod rewrite +RUN pecl install apcu && docker-php-ext-enable apcu + +WORKDIR /var/www/html +RUN composer install --optimize-autoloader --no-suggest --no-progress \ No newline at end of file -- 2.47.2 From 3176001a7ef6cee7c593b99b938a2dd5d17e8496 Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Fri, 10 Jan 2025 15:25:04 +0100 Subject: [PATCH 2/5] debug --- .gitea/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2afd8f4..b0bc3f5 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,10 +1,10 @@ name: build -on: - pull_request: - types: - - closed - branches: - - main +on: push +# pull_request: +# types: +# - closed +# branches: +# - main jobs: build: runs-on: remote -- 2.47.2 From 00617c93ce36f7e25d974b09bf38b15da5920a8b Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Fri, 10 Jan 2025 15:40:01 +0100 Subject: [PATCH 3/5] debug --- .docker/hosts/abiball.conf | 14 ++++++++++++++ .gitignore | 2 +- Dockerfile | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .docker/hosts/abiball.conf diff --git a/.docker/hosts/abiball.conf b/.docker/hosts/abiball.conf new file mode 100644 index 0000000..022eb20 --- /dev/null +++ b/.docker/hosts/abiball.conf @@ -0,0 +1,14 @@ + + DocumentRoot /var/www/html/public + DirectoryIndex /index.php + + + AllowOverride All + + RewriteEngine On + + + + ErrorLog /var/log/apache2/project_error.log + CustomLog /var/log/apache2/project_access.log combined + \ No newline at end of file diff --git a/.gitignore b/.gitignore index a67f91e..008222e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ - +/.idea/ ###> symfony/framework-bundle ### /.env.local /.env.local.php diff --git a/Dockerfile b/Dockerfile index 8382afe..ae205c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ COPY . /var/www/html/ RUN chown -R www-data:www-data /var/www/html +RUN rm /etc/apache2/sites-enabled/000-default.conf +COPY .docker/hosts/abiball.conf /etc/apache2/sites-enabled + RUN apt-get update \ && apt-get install -qq -y --no-install-recommends cron nano locales coreutils libicu-dev libpng-dev libxml2-dev libzip-dev libonig-dev libxslt-dev; -- 2.47.2 From 969d1dd4b7da1c0918cefd7539c6638f67ccedf9 Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Fri, 10 Jan 2025 15:47:04 +0100 Subject: [PATCH 4/5] no debug --- .gitea/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index b0bc3f5..2afd8f4 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,10 +1,10 @@ name: build -on: push -# pull_request: -# types: -# - closed -# branches: -# - main +on: + pull_request: + types: + - closed + branches: + - main jobs: build: runs-on: remote -- 2.47.2 From d5d46df3e538556f755307a4f3810444bd6ee7ed Mon Sep 17 00:00:00 2001 From: Constantin Simonis Date: Fri, 10 Jan 2025 15:48:38 +0100 Subject: [PATCH 5/5] whoopd --- .idea/.gitignore | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -- 2.47.2