fix docker

This commit is contained in:
Saeed Vaziry 2024-04-13 12:31:53 +02:00
parent c43869d255
commit 3019c3d213
2 changed files with 10 additions and 9 deletions

View File

@ -29,6 +29,7 @@ jobs:
docker buildx build . \ docker buildx build . \
-f docker/Dockerfile \ -f docker/Dockerfile \
-t vitodeploy/vito:1.x \ -t vitodeploy/vito:1.x \
--build-arg RELEASE=0 \ --build-arg="RELEASE=0"\
--platform linux/amd64,linux/arm64 \ --platform linux/amd64,linux/arm64 \
--no-cache \
--push --push

View File

@ -9,21 +9,21 @@ WORKDIR /var/www/html
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# upgrade # upgrade
RUN apt clean && apt update && apt update && apt upgrade -y && apt autoremove -y RUN apt-get clean && apt-get update && apt-get update && apt-get upgrade -y && apt-get autoremove -y
# requirements # requirements
RUN apt install -y software-properties-common curl zip unzip git gcc RUN apt-get install -y software-properties-common curl zip unzip git gcc
# nginx # nginx
RUN apt install -y nginx RUN apt-get install -y nginx
# php # php
RUN apt update \ RUN apt-get update \
&& apt install -y gnupg gosu curl ca-certificates zip unzip git supervisor libcap2-bin libpng-dev \ && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor libcap2-bin libpng-dev \
python2 dnsutils librsvg2-bin fswatch wget \ python2 dnsutils librsvg2-bin fswatch wget \
&& add-apt-repository ppa:ondrej/php -y \ && add-apt-repository ppa:ondrej/php -y \
&& apt update \ && apt-get update \
&& apt install -y php8.2 php8.2-fpm php8.2-mbstring php8.2-mcrypt php8.2-gd php8.2-xml \ && apt-get install -y php8.2 php8.2-fpm php8.2-mbstring php8.2-mcrypt php8.2-gd php8.2-xml \
php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.2-sqlite3 php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.2-sqlite3
COPY docker/php.ini /etc/php/8.2/cli/conf.d/99-vito.ini COPY docker/php.ini /etc/php/8.2/cli/conf.d/99-vito.ini
@ -33,7 +33,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
# app # app
RUN rm -rf /var/www/html RUN rm -rf /var/www/html
RUN git clone -b 1.x https://github.com/vitodeploy/vito.git /var/www/html RUN git clone -b 1.x https://github.com/vitodeploy/vito.git /var/www/html
RUN [ "$RELEASE_ARG" -eq 1 ] && git checkout $(git tag -l --merged 1.x --sort=-v:refname | head -n 1) RUN [ "$RELEASE_ARG" = "1" ] && git checkout $(git tag -l --merged 1.x --sort=-v:refname | head -n 1) || true
RUN composer install --no-dev --prefer-dist RUN composer install --no-dev --prefer-dist
RUN chown -R www-data:www-data /var/www/html \ RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache && chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache