From e34744ad996f1893d797959ee2a46a19714a32e4 Mon Sep 17 00:00:00 2001 From: soheil khaledabadi Date: Sat, 6 Jun 2026 21:24:20 +0330 Subject: [PATCH] chore(docker): update Docker and docker-compose configurations for Arvan Cloud integration and add mirror settings --- Dockerfile | 10 ++-------- README.md | 7 +++++++ docker-compose.yml | 10 +++++----- docker/apt/debian.sources | 5 +++++ docker/daemon.json | 3 +++ 5 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 docker/apt/debian.sources create mode 100644 docker/daemon.json diff --git a/Dockerfile b/Dockerfile index 3726990..8874e62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,15 +4,9 @@ WORKDIR /var/www/html ENV COMPOSER_ALLOW_SUPERUSER=1 COPY docker/php/install-php-extensions /usr/local/bin/install-php-extensions +COPY docker/apt/debian.sources /etc/apt/sources.list.d/debian.sources -RUN if [ -f /etc/apt/sources.list.d/debian.sources ]; then \ - sed -i \ - -e 's|https\?://deb\.debian\.org/debian|http://mirror.arvancloud.ir/debian|g' \ - -e 's|https\?://security\.debian\.org/debian-security|http://mirror.arvancloud.ir/debian|g' \ - -e 's| bookworm-updates||g' \ - /etc/apt/sources.list.d/debian.sources; \ - fi \ - && apt-get -o Acquire::Check-Valid-Until=false update \ +RUN apt-get -o Acquire::Check-Valid-Until=false update \ && apt-get install -y --no-install-recommends \ curl \ default-mysql-client \ diff --git a/README.md b/README.md index 08870d1..8c1cac5 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,13 @@ APP_KEY=base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= سپس `APP_URL`، `HTTP_PORT`، `DB_PASSWORD`، `MARIADB_PASSWORD` و `MARIADB_ROOT_PASSWORD` را هم تغییر دهید. مقدار پیش‌فرض `HTTP_PORT=8080` است. +روی سرور ایران، میرور Docker را یک‌بار تنظیم کنید: + +```bash +sudo cp docker/daemon.json /etc/docker/daemon.json +sudo systemctl restart docker +``` + برای build کردن imageها: ```bash diff --git a/docker-compose.yml b/docker-compose.yml index 59ff9bd..fdf1597 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,8 +49,8 @@ services: DB_PORT: 3306 command: php artisan queue:work database --sleep=3 --tries=3 --timeout=90 depends_on: - mariadb: - condition: service_healthy + - app + - mariadb volumes: - app-storage:/var/www/html/storage networks: @@ -69,15 +69,15 @@ services: DB_PORT: 3306 command: sh -c "while true; do php artisan schedule:run --no-interaction; sleep 60; done" depends_on: - mariadb: - condition: service_healthy + - app + - mariadb volumes: - app-storage:/var/www/html/storage networks: - hoshpoint mariadb: - image: mariadb:11.4 + image: docker.arvancloud.ir/mariadb:11.4 restart: unless-stopped env_file: - ${APP_ENV_FILE:-.env.production} diff --git a/docker/apt/debian.sources b/docker/apt/debian.sources new file mode 100644 index 0000000..98b8797 --- /dev/null +++ b/docker/apt/debian.sources @@ -0,0 +1,5 @@ +Types: deb +URIs: http://mirror.arvancloud.ir/debian +Suites: bookworm +Components: main +Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg diff --git a/docker/daemon.json b/docker/daemon.json new file mode 100644 index 0000000..445ceb2 --- /dev/null +++ b/docker/daemon.json @@ -0,0 +1,3 @@ +{ + "registry-mirrors": ["https://docker.arvancloud.ir"] +}