Skip to content

Commit

Permalink
Generate assets on production upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AchillesKal committed Apr 3, 2024
1 parent b5d6443 commit 4201593
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ To install the assets
```
php bin/console tailwind:build
```

To compile the assets
```
php bin/console asset-map:compile
```
11 changes: 11 additions & 0 deletions frankenphp/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then

setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var

php bin/console tailwind:build

# create public uploads/banners directory
mkdir -p public/uploads/banners

# check if APP_ENV is set to "prod"
if [ "$APP_ENV" = 'prod' ]; then
php bin/console asset-map:compile
php bin/console d:f:l --no-interaction
fi
fi

exec docker-php-entrypoint "$@"

0 comments on commit 4201593

Please sign in to comment.