Skip to content

Commit d82139b

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 9f78ece + 33d8f5d commit d82139b

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,32 @@
66
composer 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+
```

docker/php.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app
55
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
66
RUN install-php-extensions @composer
77
## Install dependencies
8-
COPY / /app
8+
COPY / /app/
99
RUN composer install --optimize-autoloader --no-dev
1010

1111
# Vite.js build
@@ -28,7 +28,7 @@ RUN install-php-extensions bcmath pdo_pgsql redis
2828

2929
WORKDIR /app
3030

31-
COPY / /app
31+
COPY / /app/
3232
COPY --from=node /app/public/build/ /app/public/build/
3333
COPY --from=composer /app/vendor/ /app/vendor/
3434

@@ -37,4 +37,4 @@ RUN chown --recursive www-data:www-data /app/storage
3737
RUN 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"]

0 commit comments

Comments
 (0)