Deployment on web does not work

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): web

I tried to deploy my web app using docker and docker-compose. However, when I go to the root URL, i get a blank page. Looking at the network tab of the developer window of chrome, I see that the request that should return the page instead returns : “Oh no! It looks like JavaScript is not enabled in your browser.”.
My dockerfile is:

FROM node:14.13.1-buster-slim


ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH /home/node/.npm-global/bin:$PATH

ARG REACT_APP_API_URL
ENV REACT_APP_API_URL $REACT_APP_API_URL


ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
RUN npm i --unsafe-perm -g npm@latest expo-cli@latest

RUN mkdir /opt/web_app && chown node:node /opt/web_app
WORKDIR /opt/web_app
ENV PATH /opt/web_app/.bin:$PATH
USER node
COPY --chown=node:node ./package.json ./package-lock.json ./
RUN npm install --unsafe-perm


# copy in our source code last, as it changes the most
WORKDIR /opt/web_app/app
# for development, we bind mount volumes; comment out for production
COPY ./ .

ENTRYPOINT ["npm", "run"]
CMD ["web"]

Relevant part of the docker compose is

  web_app:
    build: mobile
    container_name: web_app
    ports:
      - '19006:19006'
      - '19001:19001'
      - '19002:19002'
    expose: 
    - 19006
    volumes:
      - ./mobile:/opt/web_app/app:delegated
      - ./mobile/package.json:/opt/web_app/package.json
      - ./mobile/package-lock.json:/opt/web_app/package-lock.json
      - notused:/opt/web_app/app/node_modules
    restart: always
    environment:
      - REACT_APP_API_URL=myurl
      - NODE_ENV=demo
    networks:
      - mynetwork

 

Any idea what’s wrong?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.