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/.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/.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 new file mode 100644 index 0000000..ae205c5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM php:8.2-apache + +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; + +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