Merge pull request #3362 from appwrite/docker-compose-v2
Feat: Start using docker compose V2
This commit is contained in:
commit
e5b0cbd308
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
- Start using docker compose V2 (from `docker-compose` to `docker compose`)
|
||||||
|
|
||||||
# Version 0.14.2
|
# Version 0.14.2
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -131,6 +131,9 @@ ARG VERSION=dev
|
||||||
ARG DEBUG=false
|
ARG DEBUG=false
|
||||||
ENV DEBUG=$DEBUG
|
ENV DEBUG=$DEBUG
|
||||||
|
|
||||||
|
ENV DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||||
|
ENV DOCKER_COMPOSE_VERSION=v2.5.0
|
||||||
|
|
||||||
ENV _APP_SERVER=swoole \
|
ENV _APP_SERVER=swoole \
|
||||||
_APP_ENV=production \
|
_APP_ENV=production \
|
||||||
_APP_LOCALE=en \
|
_APP_LOCALE=en \
|
||||||
|
@ -232,12 +235,17 @@ RUN \
|
||||||
libmaxminddb-dev \
|
libmaxminddb-dev \
|
||||||
certbot \
|
certbot \
|
||||||
docker-cli \
|
docker-cli \
|
||||||
docker-compose \
|
|
||||||
libgomp \
|
libgomp \
|
||||||
&& docker-php-ext-install sockets opcache pdo_mysql \
|
&& docker-php-ext-install sockets opcache pdo_mysql \
|
||||||
&& apk del .deps \
|
&& apk del .deps \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
mkdir -p $DOCKER_CONFIG/cli-plugins \
|
||||||
|
&& ARCH=$(uname -m) && if [ $ARCH == "armv7l" ]; then $ARCH="armv7"; fi \
|
||||||
|
&& curl -SL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-linux-$ARCH -o $DOCKER_CONFIG/cli-plugins/docker-compose \
|
||||||
|
&& chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
if [ "$DEBUG" == "true" ]; then \
|
if [ "$DEBUG" == "true" ]; then \
|
||||||
apk add boost boost-dev; \
|
apk add boost boost-dev; \
|
||||||
|
|
|
@ -214,9 +214,9 @@ $cli
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\"");
|
Console::log("Running \"docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\"");
|
||||||
|
|
||||||
$exit = Console::execute("${env} docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
|
$exit = Console::execute("${env} docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
|
||||||
|
|
||||||
if ($exit !== 0) {
|
if ($exit !== 0) {
|
||||||
$message = 'Failed to install Appwrite dockers';
|
$message = 'Failed to install Appwrite dockers';
|
||||||
|
|
Loading…
Reference in a new issue