Skip to content

Commit

Permalink
[Docker + p.sh] Swith to PHP 7.2 & allow Dockerfiles to take version …
Browse files Browse the repository at this point in the history
…by env var (#319)
  • Loading branch information
andrerom committed Aug 20, 2018
1 parent 8f3c93f commit cb67948
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .env
Expand Up @@ -10,8 +10,8 @@ DATABASE_PASSWORD=SetYourOwnPassword
DATABASE_NAME=ezp

## Docker images (name and version)
PHP_IMAGE=ezsystems/php:7.1-v1
PHP_IMAGE_DEV=ezsystems/php:7.1-v1-dev
PHP_IMAGE=ezsystems/php:7.2-v1
PHP_IMAGE_DEV=ezsystems/php:7.2-v1-dev
NGINX_IMAGE=nginx:stable
MYSQL_IMAGE=healthcheck/mariadb
SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.4.0
Expand Down
2 changes: 1 addition & 1 deletion .platform.app.yaml
Expand Up @@ -8,7 +8,7 @@
name: app

# The type of the application to build.
type: php:7.1
type: php:7.2
build:
# "none" means we're running composer manually, see build hook
flavor: "none"
Expand Down
5 changes: 3 additions & 2 deletions doc/docker/Dockerfile-app
@@ -1,4 +1,5 @@
FROM ezsystems/php:7.1-v1 as builder
ARG PHP_IMAGE=ezsystems/php:7.2-v1
FROM ${PHP_IMAGE} as builder

# This is prod image (for dev use just mount your application as host volume into php image we extend here)
ENV SYMFONY_ENV=prod
Expand Down Expand Up @@ -26,7 +27,7 @@ RUN rm -Rf app/logs/* app/cache/*/*
RUN rm -rf web/css web/fonts web/js web/var


FROM ezsystems/php:7.1-v1
FROM ${PHP_IMAGE}

# This is prod image (for dev use just mount your application as host volume into php image we extend here)
ENV SYMFONY_ENV=prod
Expand Down
3 changes: 2 additions & 1 deletion doc/docker/Dockerfile-nginx
@@ -1,4 +1,5 @@
FROM ezsystems/php:7.1-v1 as web-build
ARG PHP_IMAGE=ezsystems/php:7.2-v1
FROM ${PHP_IMAGE} as web-build

ENV SYMFONY_ENV=prod

Expand Down
4 changes: 4 additions & 0 deletions doc/docker/base-prod.yml
Expand Up @@ -6,6 +6,8 @@ services:
build:
context: ../../
dockerfile: ${APP_DOCKER_FILE}
args:
- PHP_IMAGE
depends_on:
- db
environment:
Expand All @@ -28,6 +30,8 @@ services:
build:
context: ../../
dockerfile: doc/docker/Dockerfile-nginx
args:
- PHP_IMAGE
depends_on:
- app
ports:
Expand Down
4 changes: 2 additions & 2 deletions doc/docker/distribution.yml
Expand Up @@ -14,7 +14,7 @@ services:
- backend

app:
image: ezsystems/php:7.1-v1
image: ${PHP_IMAGE}
depends_on:
- db
- distribution
Expand All @@ -39,7 +39,7 @@ services:
- vardir:/var/www/web/var

web:
image: nginx:stable
image: ${NGINX_IMAGE}
depends_on:
- distribution
- app
Expand Down

0 comments on commit cb67948

Please sign in to comment.