avoid npm install error within a broken git submodule

This commit is contained in:
chandi 2020-04-12 20:20:50 +02:00
parent 697c31c50a
commit 9030383994
2 changed files with 24 additions and 1 deletions

View File

@ -92,7 +92,9 @@ services:
network_mode: host
webrtc-sfu:
build: ./bbb-webrtc-sfu
build:
context: ./bbb-webrtc-sfu
dockerfile: mod/webrtc-sfu/Dockerfile
depends_on:
- redis
- kurento

21
mod/webrtc-sfu/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM node:12
ADD . app
WORKDIR app
ENV NODE_ENV production
# due to the git submodule npm install crashes with following error:
# npm ERR! fatal: Not a git repository: ../.git/modules/bbb-webrtc-sfu
# we simply delete the .git file
RUN cp config/default.example.yml config/production.yml \
&& rm .git \
&& npm install --unsafe-perm \
&& npm cache clear --force
EXPOSE 3008
ENTRYPOINT [ "./docker-entrypoint.sh" ]
CMD [ "npm", "start" ]