In serverless.yml file the below line should be added in custom section
serverless-offline: host: 0.0.0.0
| FROM python:3.7 | |
| LABEL author="Vassilis Pallas" | |
| # set environment for pipenv | |
| ENV LC_ALL en_US.UTF-8 | |
| ENV LANG en_US.UTF-8 | |
| RUN mkdir -p /usr/src/app | |
| WORKDIR /usr/src/app | |
| # install nodejs | |
| RUN apt-get update -yq \ | |
| && apt-get install curl gnupg -yq \ | |
| && curl -sL https://deb.nodesource.com/setup_13.x | bash \ | |
| && apt-get install nodejs -yq | |
| COPY package*.json ./ | |
| COPY Pipfile* ./ | |
| RUN npm i | |
| RUN pip3 install pipenv | |
| RUN pipenv install --dev | |
| COPY . . | |
| EXPOSE 3000 | |
| CMD ["pipenv", "run", "npm", "start"] |