Skip to content

Commit

Permalink
Add docker image for human testing
Browse files Browse the repository at this point in the history
  • Loading branch information
t2d committed Dec 1, 2024
1 parent c073f91 commit ed5b743
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM composer AS composer

FROM php:8.2-apache-bookworm
RUN apt-get update && apt-get install -y libpng-dev libzip-dev nodejs npm zlib1g-dev zip
RUN docker-php-ext-install -j$(nproc) gd zip
COPY . /var/www/html
COPY userli.conf /etc/apache2/sites-enabled/000-default.conf
COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN mv .env.test .env
RUN APP_ENV=test composer install --no-scripts && bin/console doctrine:schema:create --env=test && bin/console doctrine:fixtures:load --group=basic --env=test -n
RUN npm install --global yarn && yarn install && yarn encore production
RUN bin/console assets:install
RUN chown -R www-data:www-data var
36 changes: 36 additions & 0 deletions userli.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<VirtualHost *:80>

DocumentRoot /var/www/html/public

<Directory /var/www/html/public>
AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,SymLinksIfOwnerMatch,MultiViews
Options -Indexes -MultiViews +SymLinksIfOwnerMatch

LimitRequestBody 10485760

</Directory>

<Directory /var/www/html/public/.well-known>
Require all granted
</Directory>

SetEnv APP_ENV test

<IfModule fcgid_module>
AddHandler fcgid-script .php
FCGIWrapper /var/www/users.example.org/php-fcgi/php-fcgi-starter .php

IPCConnectTimeout 20
IPCCommTimeout 60
FcgidBusyTimeout 60
MaxRequestLen 10485760

<Directory /var/www/html/public>
Options +ExecCGI
</Directory>
</IfModule>

ErrorLog "|/usr/bin/logger -t apache -p local0.error"

Protocols h2 http/1.1
</VirtualHost>

0 comments on commit ed5b743

Please sign in to comment.