View more context

 

guy_van_bael

Hi all. Userforms question.... Does anybody know if it’s possible to submit the form to a recipient based on the choice of a radiobutton on the frontend?

feejin

Should be possible using the “Custom Rules” tab under recipients. You can set it to only send to a recipient based on form values.

💪 (1)
mmativ

Hello, any recommendation for CMS color picker?

Nik

Would someone be able to explain to me how SilverStripe does it's magic around has_one? I have an ElementalArea that I am trying to map to in a __call magic method, but it seems like method_exists ($this, "ElementalArea") returns false still. It seems like SS is mapping function calls to properties?

Nik

Awesome, will give that a shot. Thanks!

taoceanz

Could anyone suggest a good Docker image to use for SilverStripe 4.4?

guttmann

I use https://github.com/brettt89/silverstripe-web as a base image for my dev environments

Show 1 attachment(s)
brettt89/silverstripe-web

Docker - SilverStripe Web - Apache + PHP + xdebug for development environments

Hide attachment content
guttmann

2 seconds, just upgrading a site from 4.3 to 4.4 so will know shortly 😛

guttmann

seems to work fine

taoceanz

Do you use image: brettt89/silverstripe-web with a particular tag?

guttmann

For SS4 sites we use: brettt89/silverstripe-web:7.1-platform

taoceanz

Cool, that's what I was considering using. That doesn't have anything to do with the SilverStripe Platform?

guttmann

you can see everything it installs here: https://github.com/brettt89/silverstripe-web/blob/master/7.1/platform/Dockerfile

Show 1 attachment(s)
7.1/platform/Dockerfile

FROM php:7.1-apache-jessie
MAINTAINER Brett Tasker "<[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive

# Install components
RUN apt-get update -y && apt-get install -y \
        curl \
        git-core \
        gzip \
        libcurl4-openssl-dev \
        libgd-dev \
        libldap2-dev \
        libmcrypt-dev \
        libtidy-dev \
        libxslt-dev \
        zlib1g-dev \
        libicu-dev \
        g++ \
        openssh-client \
        libmagickwand-dev \
        unzip \
        zip \
    --no-install-recommends && \
    curl -sS <https://silverstripe.github.io/sspak/install> | php -- /usr/local/bin &amp;&amp; \
    curl -sS <https://getcomposer.org/installer> | php &amp;&amp; mv composer.phar /usr/local/bin/composer &amp;&amp; \
    pecl install xdebug &amp;&amp; \
    pecl install imagick-3.4.3 &amp;&amp; \
    apt-get remove -y libmagickwand-dev &amp;&amp; \
    apt-get install -y libmagickwand-6.q16-2 &amp;&amp; \
    apt-get autoremove -y &amp;&amp; \
    rm -r /var/lib/apt/lists/*

# Install PHP Extensions
RUN docker-php-ext-configure intl &amp;&amp; \
    docker-php-ext-configure mysqli --with-mysqli=mysqlnd &amp;&amp; \
    docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ &amp;&amp; \
    docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &amp;&amp; \
    docker-php-ext-enable xdebug &amp;&amp; \
    docker-php-ext-enable imagick &amp;&amp; \
    sed -i '1 a xdebug.remote_autostart=true' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_mode=req' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_handler=dbgp' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_connect_back=1 ' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_port=9000' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_host=127.0.0.1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
        sed -i '1 a xdebug.remote_enable=1' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini &amp;&amp; \
    docker-php-ext-install -j$(nproc) \
        intl \
        gd \
        ldap \
        mcrypt \
        mysqli \
        pdo \
        pdo_mysql \
        soap \
        tidy \
        xsl \
        zip

# Apache + xdebug configuration
RUN { \
                echo "&lt;VirtualHost *:80&gt;"; \
                echo "  DocumentRoot /var/www/html"; \
                echo "  LogLevel warn"; \
                echo "  ErrorLog /var/log/apache2/error.log"; \
                echo "  CustomLog /var/log/apache2/access.log combined"; \
                echo "  ServerSignature Off"; \
                echo "  &lt;Directory /var/www/html&gt;"; \
                echo "    Options +FollowSymLinks"; \
                echo "    Options -ExecCGI -Includes -Indexes"; \
                echo "    AllowOverride all"; \
                echo; \
                echo "    Require all granted"; \
                echo "  &lt;/Directory&gt;"; \
                echo "  &lt;LocationMatch assets/&gt;"; \
                echo "    php_flag engine off"; \
                echo "  &lt;/LocationMatch&gt;"; \
                echo; \
                echo "  IncludeOptional sites-available/000-default.local*"; \
                echo "&lt;/VirtualHost&gt;"; \
    } | tee /etc/apache2/sites-available/000-default.conf

RUN echo "ServerName localhost" &gt; /etc/apache2/conf-available/fqdn.conf &amp;&amp; \
    echo "date.timezone = Pacific/Auckland" &gt; /usr/local/etc/php/conf.d/timezone.ini &amp;&amp; \
    a2enmod rewrite expires remoteip cgid &amp;&amp; \
    usermod -u 1000 www-data &amp;&amp; \
    usermod -G staff www-data

EXPOSE 80
CMD ["apache2-foreground"]
Hide attachment content
guttmann

might just be that it installs php extensions that are also available on SilverStripe platform?

taoceanz

Ah yeah, I had the thought it wasn't intrinsically tied the the SilverStripe Platform, but that it get's it set up in line with the platform.

taoceanz

@guttmann do you have your entry point in a public folder? If so, did you do anything in particular to your Dockerfile to get the site loading correctly from the public folder?

guttmann

one of my sites uses the public folder but I'm relying on the .htaccess one level above the public folder to redirect all requests to public

guttmann

haven't messed around with the document root yet


Show less replies