Skip to content

Commit

Permalink
Add production settings and helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes authored and niklasnatter committed Jun 30, 2021
1 parent e4c7d6b commit 534df99
Show file tree
Hide file tree
Showing 17 changed files with 704 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
vendor
node_modules
tests
var
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ SULU_ADMIN_EMAIL=

###> doctrine/phpcr-bundle ###
###< doctrine/phpcr-bundle ###

VARNISH_SERVER=127.0.0.1
45 changes: 45 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM php:7.4-apache AS php

WORKDIR /var/www/html

# install packages
# inkscape is recommended for handling svg files with imagemagick
RUN apt-get update && apt-get install -y \
libicu-dev \
libpng-dev \
libmagickwand-dev \
inkscape \
git \
unzip \
libzip-dev

# install PHP extensions
RUN docker-php-ext-install -j$(nproc) \
intl \
pdo \
pdo_mysql \
zip

RUN pecl install redis apcu imagick && docker-php-ext-enable redis apcu imagick

# apache extensions
RUN /usr/sbin/a2enmod rewrite && /usr/sbin/a2enmod headers && /usr/sbin/a2enmod expires

# install php dependencies in intermediate container
FROM php AS composer

COPY symfony.lock /var/www/html/
COPY composer.* /var/www/html/

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer self-update --1
RUN composer install --no-interaction --no-cache --no-scripts --no-dev --prefer-dist --optimize-autoloader --apcu-autoloader

FROM php AS project

# copy project code and results from intermediate containers
COPY --from=composer /var/www/html/vendor/ /var/www/html/vendor/
COPY . /var/www/html/

# apache config
COPY ./deploy/config/apache.conf /etc/apache2/sites-available/000-default.conf
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"handcraftedinthealps/zendsearch": "^2.0",
"jackalope/jackalope-doctrine-dbal": "^1.3",
"sulu/sulu": "~2.1.1",
"superbalist/flysystem-google-storage": "^7.2",
"symfony/config": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/flex": "^1.2",
Expand Down
Loading

0 comments on commit 534df99

Please sign in to comment.