diff --git a/{{cookiecutter.project_slug}}/Makefile b/{{cookiecutter.project_slug}}/Makefile index 9ce429449..c19546dad 100644 --- a/{{cookiecutter.project_slug}}/Makefile +++ b/{{cookiecutter.project_slug}}/Makefile @@ -43,7 +43,7 @@ build-client: docker compose build client build-server: - docker-compose build server + docker compose build server run: docker compose up diff --git a/{{cookiecutter.project_slug}}/compose/client/start b/{{cookiecutter.project_slug}}/compose/client/start new file mode 100644 index 000000000..917128006 --- /dev/null +++ b/{{cookiecutter.project_slug}}/compose/client/start @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +# Check if node_modules directory is empty +if [ ! "$(ls -A /app/node_modules)" ]; then + echo "node_modules directory is empty. Installing dependencies..." + npm install +fi + +# Start your application +exec "$@"