Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
3,379 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
APP_ENV=dev | ||
APP_SECRET=foo | ||
LOCALE=en | ||
DATABASE_URL=pgsql://audiencehero:audiencehero@db/audiencehero | ||
MAILER_URL=smtp://smtp.mailgun.com?login=postmaster@foo&password=foo | ||
RABBITMQ_URL=amqp://guest:guest@localhost:5672/audiencehero | ||
AWS_ID=foo | ||
AWS_SECRET=foo | ||
AWS_UPLOAD_BUCKET=foo | ||
GOOGLE_API_KEY=foo | ||
MAILGUN_KEY=foo | ||
RECAPTCHA_PUBLIC_KEY=foo | ||
RECAPTCHA_PRIVATE_KEY=foo | ||
CORS_ALLOW_ORIGIN=* | ||
JWT_PRIVATE_KEY_PATH=%kernel.root_dir%/../var/jwt/dev_private.pem | ||
JWT_PUBLIC_KEY_PATH=%kernel.root_dir%/../var/jwt/dev_public.pem | ||
JWT_KEY_PASS_PHRASE=passphrase | ||
JWT_TOKEN_TTL=86400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.env | ||
app/config/parameters.yml | ||
docs/build | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,71 @@ | ||
FROM php:7.1 | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update -yqq && apt-get install -yqq apt-transport-https | ||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | ||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install -y apt-transport-https && \ | ||
apt-get install -y apt-utils && \ | ||
apt-get install -y awscli && \ | ||
apt-get install -y sudo wget yarn nodejs git libmagickwand-dev libmagickcore-dev libcurl4-gnutls-dev libicu-dev \ | ||
libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev \ | ||
libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev \ | ||
libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev librabbitmq-dev librabbitmq1 \ | ||
unzip | ||
|
||
|
||
RUN pecl install redis-3.1.1 && \ | ||
pecl install imagick-3.4.3 && \ | ||
pecl install xdebug-2.5.1 && \ | ||
pecl install amqp-1.9.0 && \ | ||
docker-php-ext-enable redis && \ | ||
docker-php-ext-enable imagick && \ | ||
docker-php-ext-enable xdebug && \ | ||
docker-php-ext-enable amqp && \ | ||
docker-php-ext-install bcmath mbstring mcrypt pdo pdo_pgsql curl json intl gd xml zip bz2 opcache soap pcntl | ||
|
||
## | ||
# Install composer | ||
# | ||
RUN wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig && \ | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | ||
php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | ||
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ | ||
php -r "unlink('composer-setup.php'); unlink('installer.sig');" | ||
|
||
## | ||
# At this point Google Chrome Beta is 59 - first version with headless support | ||
# | ||
RUN wget -q https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb | ||
RUN dpkg -i google-chrome-beta_current_amd64.deb; apt-get -fy install | ||
|
||
## | ||
# Install chromedriver to make it work with Selenium | ||
# | ||
RUN wget -q https://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip | ||
RUN unzip chromedriver_linux64.zip -d /usr/local/bin | ||
|
||
RUN apt-get clean | ||
FROM composer:1.6 | ||
FROM php:7.2-fpm-alpine3.7 | ||
|
||
RUN apk add --no-cache \ | ||
git | ||
|
||
ENV APCU_VERSION 5.1.9 | ||
RUN set -xe \ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
$PHPIZE_DEPS \ | ||
icu-dev \ | ||
postgresql-dev \ | ||
zlib-dev \ | ||
libpng-dev \ | ||
libxml2-dev \ | ||
imagemagick-dev \ | ||
imagemagick \ | ||
imagemagick-libs \ | ||
&& docker-php-ext-install \ | ||
intl \ | ||
pdo \ | ||
pdo_mysql \ | ||
pdo_pgsql \ | ||
zip \ | ||
gd \ | ||
soap \ | ||
bcmath \ | ||
&& pecl install \ | ||
apcu-${APCU_VERSION} \ | ||
imagick \ | ||
&& docker-php-ext-enable pdo \ | ||
&& docker-php-ext-enable pdo_mysql \ | ||
&& docker-php-ext-enable pdo_pgsql \ | ||
&& docker-php-ext-enable imagick \ | ||
&& docker-php-ext-enable gd \ | ||
&& docker-php-ext-enable soap \ | ||
&& docker-php-ext-enable bcmath \ | ||
&& docker-php-ext-enable --ini-name 20-apcu.ini apcu \ | ||
&& docker-php-ext-enable --ini-name 05-opcache.ini opcache \ | ||
&& runDeps="$( \ | ||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ | ||
| tr ',' '\n' \ | ||
| sort -u \ | ||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ | ||
)" \ | ||
&& apk add --no-cache --virtual .php-phpexts-rundeps $runDeps \ | ||
&& apk del .build-deps | ||
|
||
COPY --from=0 /usr/bin/composer /usr/bin/composer | ||
COPY docker/php/php.ini /usr/local/etc/php/php.ini | ||
COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
RUN chmod +x /usr/local/bin/docker-entrypoint | ||
|
||
WORKDIR /srv/audiencehero | ||
ENTRYPOINT ["docker-entrypoint"] | ||
CMD ["php-fpm"] | ||
|
||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --classmap-authoritative | ||
|
||
# Prevent the reinstallation of vendors at every changes in the source code | ||
COPY composer.json composer.lock ./ | ||
RUN composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest \ | ||
&& composer clear-cache | ||
|
||
COPY . ./ | ||
|
||
RUN mkdir -p var/cache var/logs var/sessions \ | ||
&& composer dump-autoload --classmap-authoritative --no-dev \ | ||
&& chown -R www-data var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM nginx:1.13-alpine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:9-alpine | ||
|
||
RUN apk add --no-cache \ | ||
git \ | ||
yarn | ||
|
||
COPY docker/node/docker-entrypoint.sh /usr/local/bin/docker-entrypoint | ||
RUN chmod +x /usr/local/bin/docker-entrypoint | ||
WORKDIR /srv/audiencehero | ||
|
||
ENTRYPOINT ["docker-entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.