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 6
6
composer require --dev blamebutton/laravel-docker-builder
7
7
```
8
8
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
+
9
31
## Usage
10
32
11
- Add ` DOCKER_IMAGE_TAG ` to your ` .env ` and run:
33
+ Set the ` DOCKER_NGINX_TAG ` and ` DOCKER_PHP_TAG ` environment variables and run:
12
34
13
35
``` 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
5
5
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
6
6
RUN install-php-extensions @composer
7
7
# # Install dependencies
8
- COPY / /app
8
+ COPY / /app/
9
9
RUN composer install --optimize-autoloader --no-dev
10
10
11
11
# Vite.js build
@@ -28,7 +28,7 @@ RUN install-php-extensions bcmath pdo_pgsql redis
28
28
29
29
WORKDIR /app
30
30
31
- COPY / /app
31
+ COPY / /app/
32
32
COPY --from=node /app/public/build/ /app/public/build/
33
33
COPY --from=composer /app/vendor/ /app/vendor/
34
34
@@ -37,4 +37,4 @@ RUN chown --recursive www-data:www-data /app/storage
37
37
RUN echo "php artisan optimize --no-ansi && php-fpm" >> /usr/bin/entrypoint.sh && \
38
38
chmod +x /usr/bin/entrypoint.sh
39
39
40
- CMD ["/usr/bin/entrypoint.sh" ]
40
+ CMD ["/usr/bin/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments