Skip to content

Commit 4f94f5e

Browse files
committed
Move assets build to docker build step
1 parent 21b08d6 commit 4f94f5e

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ npm-debug.log
99
composer.phar
1010
var/cache
1111
var/logs
12+
var/log
1213
var/sessions
1314
.env
1415
Dockerfile*
1516
docker-compose*.yml
1617
**/.DS_Store
1718
**/Thumbs.db
1819
vendor/
20+
public/build

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ RUN chown -R www-data:www-data var public \
5959
&& find var -type d -exec chmod 775 {} \; \
6060
&& find var -type f -exec chmod 664 {} \;
6161

62+
# Build frontend assets once, during image build
63+
RUN composer run-script build-web-frontend-assets
64+
6265
# Expose port and run Apache
6366
EXPOSE 80
6467
CMD ["apache2-foreground"]

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ services:
3232
mkdir -p /var/www/html/var/cache/prod /var/www/html/var/log
3333
&& chown -R www-data:www-data /var/www/html/var/cache /var/www/html/var/log
3434
&& chmod -R ug+rwX /var/www/html/var/cache /var/www/html/var/log
35-
&& composer run-script build-web-frontend-assets
3635
&& exec apache2-foreground
3736
"
3837

0 commit comments

Comments
 (0)