Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 9edbbed

Browse files
committed
Fixed composer version to 2.2.3
1 parent 1a40fd7 commit 9edbbed

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

.env.staging

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ MQTT_TLS_CLIENT_CERTIFICATE_KEY_PASSPHRASE=null
9696
CHANGE_SOURCE=false
9797

9898

99+
### COMPOSER #################################################
100+
101+
COMPOSER_VERSION=2.2.3
102+
103+
99104
### APP PHP #################################################
100105

101106
PHP_VERSION=8.0-fpm

docker-compose.staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
context: ./
1111
dockerfile: docker-compose/app/Dockerfile.staging
1212
args:
13+
- COMPOSER_VERSION=${COMPOSER_VERSION}
1314
- PHP_VERSION=${PHP_VERSION}
1415
- LOCAL_UID=${LOCAL_UID}
1516
- LOCAL_GID=${LOCAL_GID}

docker-compose/app/Dockerfile.staging

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
# SPDX-License-Identifier: MIT
44
#
55

6+
ARG COMPOSER_VERSION=latest
7+
68
ARG PHP_VERSION=fpm
9+
10+
FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11+
712
FROM php:${PHP_VERSION}
813

914
ARG LOCAL_UID=65534
@@ -43,8 +48,8 @@ RUN pecl install -o -f redis \
4348

4449
RUN rm -r /var/www/*
4550

46-
# Get latest Composer TODO: remove in future
47-
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
51+
# Get Composer TODO: remove in future
52+
COPY --from=inteliotportal-composer /usr/bin/composer /usr/bin/composer
4853

4954
COPY --from=inteliotportal-build --chown=$LOCAL_UID:$LOCAL_GID /var/www /var/www/
5055

docker-compose/build/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
# SPDX-License-Identifier: MIT
44
#
55

6+
ARG COMPOSER_VERSION=latest
7+
68
ARG PHP_VERSION=fpm
9+
10+
FROM composer:${COMPOSER_VERSION} AS inteliotportal-composer
11+
712
FROM php:${PHP_VERSION} AS inteliotportal-build
813

914
# Install PHP and composer dependencies
@@ -35,8 +40,8 @@ RUN pecl install -o -f redis \
3540
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip \
3641
&& docker-php-ext-enable redis
3742

38-
# Get latest Composer
39-
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
43+
# Get Composer
44+
COPY --from=inteliotportal-composer /usr/bin/composer /usr/bin/composer
4045

4146
# Install NodeJS
4247
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -

scripts/run.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ function install() {
5656

5757
dockerComposeVolumes
5858

59-
source ../.env.staging
59+
source ../.env.staging && export COMPOSER_VERSION PHP_VERSION
6060

61-
export PHP_VERSION
62-
63-
docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN --build-arg PHP_VERSION \
64-
-f $DOCKER_DIR/build/Dockerfile $PORTAL_DIR
61+
docker build --no-cache -t inteliotportal-build --build-arg HOSTNAME=$DOMAIN --build-arg COMPOSER_VERSION \
62+
--build-arg PHP_VERSION -f $DOCKER_DIR/build/Dockerfile $PORTAL_DIR
6563

6664
docker run --rm --name setup -v $DATA_DIR:/iotportaldata --env-file $ENV_DIR/uid.env inteliotportal-build
6765

0 commit comments

Comments
 (0)