chore(docker): update Docker and docker-compose configurations for Arvan Cloud integration and add mirror settings

This commit is contained in:
2026-06-06 21:24:20 +03:30
parent 10a63b46bf
commit e34744ad99
5 changed files with 22 additions and 13 deletions

View File

@@ -4,15 +4,9 @@ WORKDIR /var/www/html
ENV COMPOSER_ALLOW_SUPERUSER=1 ENV COMPOSER_ALLOW_SUPERUSER=1
COPY docker/php/install-php-extensions /usr/local/bin/install-php-extensions 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 \ RUN apt-get -o Acquire::Check-Valid-Until=false update \
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 \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
curl \ curl \
default-mysql-client \ default-mysql-client \

View File

@@ -17,6 +17,13 @@ APP_KEY=base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
سپس `APP_URL`، `HTTP_PORT`، `DB_PASSWORD`، `MARIADB_PASSWORD` و `MARIADB_ROOT_PASSWORD` را هم تغییر دهید. مقدار پیش‌فرض `HTTP_PORT=8080` است. سپس `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ها: برای build کردن imageها:
```bash ```bash

View File

@@ -49,8 +49,8 @@ services:
DB_PORT: 3306 DB_PORT: 3306
command: php artisan queue:work database --sleep=3 --tries=3 --timeout=90 command: php artisan queue:work database --sleep=3 --tries=3 --timeout=90
depends_on: depends_on:
mariadb: - app
condition: service_healthy - mariadb
volumes: volumes:
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
networks: networks:
@@ -69,15 +69,15 @@ services:
DB_PORT: 3306 DB_PORT: 3306
command: sh -c "while true; do php artisan schedule:run --no-interaction; sleep 60; done" command: sh -c "while true; do php artisan schedule:run --no-interaction; sleep 60; done"
depends_on: depends_on:
mariadb: - app
condition: service_healthy - mariadb
volumes: volumes:
- app-storage:/var/www/html/storage - app-storage:/var/www/html/storage
networks: networks:
- hoshpoint - hoshpoint
mariadb: mariadb:
image: mariadb:11.4 image: docker.arvancloud.ir/mariadb:11.4
restart: unless-stopped restart: unless-stopped
env_file: env_file:
- ${APP_ENV_FILE:-.env.production} - ${APP_ENV_FILE:-.env.production}

View File

@@ -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

3
docker/daemon.json Normal file
View File

@@ -0,0 +1,3 @@
{
"registry-mirrors": ["https://docker.arvancloud.ir"]
}