Skip to content

Commit 534df99

Browse files
wachterjohannesniklasnatter
authored andcommitted
Add production settings and helm chart
1 parent e4c7d6b commit 534df99

17 files changed

+704
-14
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
vendor
3+
node_modules
4+
tests
5+
var

.env

+2
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ SULU_ADMIN_EMAIL=
4141

4242
###> doctrine/phpcr-bundle ###
4343
###< doctrine/phpcr-bundle ###
44+
45+
VARNISH_SERVER=127.0.0.1

Dockerfile

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM php:7.4-apache AS php
2+
3+
WORKDIR /var/www/html
4+
5+
# install packages
6+
# inkscape is recommended for handling svg files with imagemagick
7+
RUN apt-get update && apt-get install -y \
8+
libicu-dev \
9+
libpng-dev \
10+
libmagickwand-dev \
11+
inkscape \
12+
git \
13+
unzip \
14+
libzip-dev
15+
16+
# install PHP extensions
17+
RUN docker-php-ext-install -j$(nproc) \
18+
intl \
19+
pdo \
20+
pdo_mysql \
21+
zip
22+
23+
RUN pecl install redis apcu imagick && docker-php-ext-enable redis apcu imagick
24+
25+
# apache extensions
26+
RUN /usr/sbin/a2enmod rewrite && /usr/sbin/a2enmod headers && /usr/sbin/a2enmod expires
27+
28+
# install php dependencies in intermediate container
29+
FROM php AS composer
30+
31+
COPY symfony.lock /var/www/html/
32+
COPY composer.* /var/www/html/
33+
34+
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
35+
RUN composer self-update --1
36+
RUN composer install --no-interaction --no-cache --no-scripts --no-dev --prefer-dist --optimize-autoloader --apcu-autoloader
37+
38+
FROM php AS project
39+
40+
# copy project code and results from intermediate containers
41+
COPY --from=composer /var/www/html/vendor/ /var/www/html/vendor/
42+
COPY . /var/www/html/
43+
44+
# apache config
45+
COPY ./deploy/config/apache.conf /etc/apache2/sites-available/000-default.conf

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"handcraftedinthealps/zendsearch": "^2.0",
3535
"jackalope/jackalope-doctrine-dbal": "^1.3",
3636
"sulu/sulu": "~2.1.1",
37+
"superbalist/flysystem-google-storage": "^7.2",
3738
"symfony/config": "^5.1",
3839
"symfony/dotenv": "^5.1",
3940
"symfony/flex": "^1.2",

0 commit comments

Comments
 (0)