Skip to content

Commit b40f991

Browse files
authored
Merge pull request #207 from cloudblue/LITE-27185-shadowing-node-modules-for-ext-prj
LITE-27185 add node_modules shadowing to extension project
2 parents 4297355 + b40ff0a commit b40f991

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

connect/cli/plugins/project/extension/templates/bootstrap/${project_slug}/Dockerfile.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ COPY pyproject.toml /install_temp/.
44
COPY poetry.* /install_temp/.
55
WORKDIR /install_temp
66
RUN poetry update && poetry install --no-root
7-
COPY package*.json /install_temp/.
8-
RUN if [ -f "/install_temp/package.json" ]; then npm install; fi
7+
COPY package*.json /extension/.
8+
WORKDIR /extension
9+
RUN if [ -f "/extension/package.json" ]; then npm install; fi

connect/cli/plugins/project/extension/templates/bootstrap/${project_slug}/docker-compose.yml.j2

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
version: '3'
22

3+
{%- if webapp_supports_ui == 'y'%}
4+
volumes:
5+
node_modules
6+
{%- endif %}
7+
38
services:
49
{{project_slug}}_dev:
510
container_name: {{project_slug}}_dev
@@ -9,6 +14,9 @@ services:
914
command: cextrun -d --no-rich-logging
1015
volumes:
1116
- .:/extension
17+
{%- if webapp_supports_ui == 'y'%}
18+
- node_modules:/extension/node_modules
19+
{%- endif %}
1220
env_file:
1321
- .{{ project_slug }}_dev.env
1422

@@ -22,6 +30,9 @@ services:
2230
tty: true
2331
volumes:
2432
- .:/extension
33+
{%- if webapp_supports_ui == 'y'%}
34+
- node_modules:/extension/node_modules
35+
{%- endif %}
2536
env_file:
2637
- .{{ project_slug }}_dev.env
2738

@@ -33,5 +44,8 @@ services:
3344
command: extension-test
3445
volumes:
3546
- .:/extension
47+
{%- if webapp_supports_ui == 'y'%}
48+
- node_modules:/extension/node_modules
49+
{%- endif %}
3650
env_file:
3751
- .{{ project_slug }}_dev.env

0 commit comments

Comments
 (0)