Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jul 5, 2017
1 parent 051cee5 commit 8976e1f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Expand Up @@ -3,7 +3,7 @@ FROM php:7.1-fpm-alpine
RUN apk add --no-cache --virtual .persistent-deps \
git \
icu-libs \
make \
make \
zlib

ENV APCU_VERSION 5.1.8
Expand All @@ -29,8 +29,7 @@ COPY docker/app/install-composer.sh /usr/local/bin/docker-app-install-composer
RUN chmod +x /usr/local/bin/docker-app-install-composer

RUN set -xe \
&& apk add --no-cache --virtual .fetch-deps \
openssl \
&& apk add --no-cache --virtual .fetch-deps openssl \
&& docker-app-install-composer \
&& mv composer.phar /usr/local/bin/composer \
&& apk del .fetch-deps
Expand All @@ -43,8 +42,7 @@ RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress

WORKDIR /srv/app

COPY composer.json ./
COPY composer.lock ./
COPY composer.* ./

RUN mkdir -p \
var/cache \
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Expand Up @@ -11,15 +11,15 @@ services:
- .env
volumes:
# Comment out the next line in production
- ./:/srv/app:rw
- ./:/srv/app/:rw
# This is for assets:install
- ./web:/srv/app/web:rw
- ./web/:/srv/app/web/:rw
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
- /srv/app/var
- /srv/app/var/cache
- /srv/app/var/logs
- /srv/app/var/sessions
- /srv/app/vendor
- /srv/app/var/
- /srv/app/var/cache/
- /srv/app/var/logs/
- /srv/app/var/sessions/
- /srv/app/vendor/

nginx:
build:
Expand Down
6 changes: 1 addition & 5 deletions docker/app/docker-entrypoint.sh
Expand Up @@ -7,11 +7,7 @@ if [ "${1#-}" != "$1" ]; then
fi

if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
# Detect the host IP
export DOCKER_BRIDGE_IP
DOCKER_BRIDGE_IP=$(ip ro | grep default | cut -d' ' -f 3)

if [ "$SYMFONY_ENV" = 'prod' ]; then
if [ "$APP_ENV" = 'prod' ]; then
composer install --prefer-dist --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction
else
composer install --prefer-dist --no-progress --no-suggest --no-interaction
Expand Down
2 changes: 1 addition & 1 deletion docker/nginx/Dockerfile
@@ -1,3 +1,3 @@
FROM nginx:1.11-alpine
FROM nginx:1.13-alpine

COPY conf.d /etc/nginx/conf.d/

0 comments on commit 8976e1f

Please sign in to comment.