chore(docker): update Docker and docker-compose configurations for Arvan Cloud integration and add mirror settings
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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 \
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
5
docker/apt/debian.sources
Normal file
5
docker/apt/debian.sources
Normal 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
3
docker/daemon.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"registry-mirrors": ["https://docker.arvancloud.ir"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user