Merge pull request #54 from investbrainapp/optimize-dockerfile

Optimize dockerfile
This commit is contained in:
hackerESQ
2025-01-26 23:40:16 -06:00
committed by GitHub
2 changed files with 14 additions and 15 deletions
+13 -13
View File
@@ -10,19 +10,19 @@ services:
ports: ports:
- "${APP_PORT:-8000}:80" - "${APP_PORT:-8000}:80"
environment: environment:
- APP_KEY= # Generate a key using `openssl rand -base64 32` APP_KEY: "" # Generate a key using `openssl rand -base64 32`
- APP_URL="http://localhost:8000" APP_URL: "http://localhost:8000"
- ASSET_URL="http://localhost:8000" ASSET_URL: "http://localhost:8000"
- DB_CONNECTION=mysql DB_CONNECTION: mysql
- DB_HOST=investbrain-mysql DB_HOST: investbrain-mysql
- DB_PORT=3306 DB_PORT: 3306
- DB_DATABASE=investbrain DB_DATABASE: ${DB_DATABASE:-investbrain}
- DB_USERNAME=investbrain DB_USERNAME: ${DB_USERNAME:-investbrain}
- DB_PASSWORD=investbrain DB_PASSWORD: ${DB_PASSWORD:-investbrain}
- SESSION_DRIVER=redis SESSION_DRIVER: redis
- QUEUE_CONNECTION=redis QUEUE_CONNECTION: redis
- CACHE_STORE=redis CACHE_STORE: redis
- REDIS_HOST=investbrain-redis REDIS_HOST: investbrain-redis
volumes: volumes:
- ./storage:/var/www/app/storage:delegated - ./storage:/var/www/app/storage:delegated
depends_on: depends_on:
+1 -2
View File
@@ -19,11 +19,10 @@ RUN apt-get update && apt-get install -y \
zlib1g-dev \ zlib1g-dev \
libzip-dev \ libzip-dev \
libicu-dev \ libicu-dev \
libpq-dev \
supervisor \ supervisor \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \ && docker-php-ext-install -j$(nproc) \
gd pgsql zip pdo_mysql mysqli intl \ gd zip pdo_mysql mysqli intl \
&& apt-get -y autoremove \ && apt-get -y autoremove \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*