mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
Add node service to docker compose with run script
This commit is contained in:
parent
9684e9ffe2
commit
a48e84bf08
2 changed files with 24 additions and 0 deletions
|
@ -38,3 +38,12 @@ services:
|
||||||
- POSTGRES_DB=app
|
- POSTGRES_DB=app
|
||||||
- POSTGRES_USER=user
|
- POSTGRES_USER=user
|
||||||
- POSTGRES_PASSWORD=feedabee
|
- POSTGRES_PASSWORD=feedabee
|
||||||
|
|
||||||
|
node:
|
||||||
|
image: node
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
working_dir: /app
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
command: ./run_node_watch.sh
|
||||||
|
|
15
src/run_node_watch.sh
Executable file
15
src/run_node_watch.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
npm install
|
||||||
|
npm rebuild
|
||||||
|
dir=./registrar/assets
|
||||||
|
if [ -d "$dir" ]
|
||||||
|
then
|
||||||
|
echo "Compiling USWDS assets"
|
||||||
|
npx gulp copyAssets
|
||||||
|
npx gulp compile
|
||||||
|
else
|
||||||
|
echo "Initial USWDS assets build"
|
||||||
|
npx gulp init
|
||||||
|
npx gulp compile
|
||||||
|
fi
|
||||||
|
npx gulp watch
|
Loading…
Add table
Add a link
Reference in a new issue