yarn install --force in node container
This commit is contained in:
parent
f7da84b719
commit
8413dba234
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,7 +1,10 @@
|
|||||||
# Uncomment to ignore Symfony project
|
# Uncomment to ignore Symfony project
|
||||||
#/app/*
|
#/app/*
|
||||||
|
/app/.yarncache
|
||||||
!/app/.keep
|
!/app/.keep
|
||||||
|
|
||||||
# Uncomment to ignore Database datas
|
# Uncomment to ignore Database datas
|
||||||
/data/*
|
/data/*
|
||||||
!/data/.keep
|
!/data/.keep
|
||||||
|
|
||||||
|
.idea
|
||||||
|
@ -42,3 +42,4 @@ Cette branche démarre d'une installation toute prête de la demo Symfony. La db
|
|||||||
+++ DATABASE_URL="postgresql://postgres:secret@db:5432/postgres?serverVersion=12&charset=utf8"
|
+++ DATABASE_URL="postgresql://postgres:secret@db:5432/postgres?serverVersion=12&charset=utf8"
|
||||||
```
|
```
|
||||||
* Create database schema: `bin/console doctrine:schema:create`
|
* Create database schema: `bin/console doctrine:schema:create`
|
||||||
|
* `$ composer require symfony/webpack-encore-bundle` and `$ yarn install --force`
|
||||||
|
5238
app/yarn.lock
Normal file
5238
app/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
23
docker-node.sh
Executable file
23
docker-node.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Ce script permet de lancer node dans un conteneur docker séparé,
|
||||||
|
# afin de disposer des outils comme yarn (paquet npm)
|
||||||
|
|
||||||
|
# exécute toujours dans le répertoire `php`
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
# la commande exécutée dans le conteneur
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
cmd=bash
|
||||||
|
else
|
||||||
|
cmd="${@}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# le conteneur node monte le dossier de l'application
|
||||||
|
docker run --rm -it \
|
||||||
|
--user "$(id -u):$(id -g)" \
|
||||||
|
--volume "${PWD}/app:/app" \
|
||||||
|
--workdir "/app" \
|
||||||
|
--env "YARN_CACHE_FOLDER=/app/.yarncache" \
|
||||||
|
node:14 ${cmd}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user