Adjust the docker-environment for silverstripe
This commit is contained in:
parent
1fc0328a8b
commit
050f94ae88
4 changed files with 43 additions and 10 deletions
2
.docker/date.ini
Normal file
2
.docker/date.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[date]
|
||||
date.timezone="Europe/Zurich"
|
|
@ -9,3 +9,9 @@ docker-compose*
|
|||
README.md
|
||||
LICENSE
|
||||
.vscode
|
||||
|
||||
# SilverStripe auto-generated content
|
||||
Website/silverstripe-cache/
|
||||
Website/vendor/
|
||||
Website/resources/
|
||||
Website/public/resources/
|
38
Dockerfile
38
Dockerfile
|
@ -1,19 +1,43 @@
|
|||
FROM php:7.1.27-apache
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
|
||||
RUN apt -y update
|
||||
RUN apt install -y --no-install-recommends \
|
||||
RUN apt update -y
|
||||
RUN apt install --no-install-recommends -y \
|
||||
libicu-dev \
|
||||
libmagickwand-dev
|
||||
libmagickwand-dev \
|
||||
libtidy-dev \
|
||||
libzip-dev \
|
||||
mysql-client \
|
||||
sudo \
|
||||
unzip \
|
||||
zip
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
RUN docker-php-ext-configure intl
|
||||
RUN docker-php-ext-install intl
|
||||
RUN docker-php-ext-configure zip --with-libzip
|
||||
RUN docker-php-ext-install \
|
||||
gd \
|
||||
intl \
|
||||
pdo \
|
||||
pdo_mysql \
|
||||
tidy \
|
||||
zip
|
||||
RUN pecl install \
|
||||
xdebug \
|
||||
imagick
|
||||
RUN docker-php-ext-enable \
|
||||
xdebug \
|
||||
imagick
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/xdebug.ini
|
||||
COPY ./src/ /var/www/html/
|
||||
ADD https://getcomposer.org/installer composer-setup.php
|
||||
RUN php composer-setup.php
|
||||
RUN mv composer.phar /usr/local/bin/composer
|
||||
COPY --chown=www-data:www-data ./Website/composer.* ./
|
||||
RUN sudo -u www-data mkdir public
|
||||
RUN sudo -u www-data composer install
|
||||
|
||||
COPY .docker/xdebug.ini $PHP_INI_DIR/conf.d/
|
||||
COPY .docker/date.ini $PHP_INI_DIR/conf.d/
|
||||
COPY --chown=www-data:www-data ./Website/ ./
|
||||
RUN sudo -u www-data composer vendor-expose
|
||||
|
|
|
@ -12,10 +12,11 @@ services:
|
|||
ports:
|
||||
- 8000:80
|
||||
db:
|
||||
image: mysql:latest
|
||||
image: mysql:5
|
||||
networks:
|
||||
- nuth
|
||||
ports:
|
||||
- 13306:3306
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: SilverStripe
|
Loading…
Reference in a new issue