File tree Expand file tree Collapse file tree 2 files changed +28
-6
lines changed
Expand file tree Collapse file tree 2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 66composer require --dev blamebutton/laravel-docker-builder
77```
88
9+ ## Configuration
10+
11+ Two environment variables need to be set:
12+
13+ * ` DOCKER_NGINX_TAG `
14+ * ` DOCKER_PHP_TAG `
15+
16+ This can be done either by adding them to your ` .env ` file or passing them to the build command.
17+
18+ ### Option 1: ` .env `
19+
20+ ```
21+ DOCKER_NGINX_TAG=laravel-app:nginx
22+ DOCKER_PHP_TAG=laravel-app:php
23+ ```
24+
25+ ### Option 2: CLI
26+
27+ ``` shell
28+ DOCKER_NGINX_TAG=laravel-app:nginx DOCKER_PHP_TAG=laravel-app:php vendor/bin/docker-build
29+ ```
30+
931## Usage
1032
11- Add ` DOCKER_IMAGE_TAG ` to your ` .env ` and run:
33+ Set the ` DOCKER_NGINX_TAG ` and ` DOCKER_PHP_TAG ` environment variables and run:
1234
1335``` shell
14- vendor/bin/docker/ build
15- ```
36+ vendor/bin/docker- build
37+ ```
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ WORKDIR /app
55COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
66RUN install-php-extensions @composer
77# # Install dependencies
8- COPY / /app
8+ COPY / /app/
99RUN composer install --optimize-autoloader --no-dev
1010
1111# Vite.js build
@@ -28,7 +28,7 @@ RUN install-php-extensions bcmath pdo_pgsql redis
2828
2929WORKDIR /app
3030
31- COPY / /app
31+ COPY / /app/
3232COPY --from=node /app/public/build/ /app/public/build/
3333COPY --from=composer /app/vendor/ /app/vendor/
3434
@@ -37,4 +37,4 @@ RUN chown --recursive www-data:www-data /app/storage
3737RUN echo "php artisan optimize --no-ansi && php-fpm" >> /usr/bin/entrypoint.sh && \
3838 chmod +x /usr/bin/entrypoint.sh
3939
40- CMD ["/usr/bin/entrypoint.sh" ]
40+ CMD ["/usr/bin/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments