Skip to content

Commit

Permalink
fix(rn): dockerized webapp fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi committed Oct 17, 2018
1 parent 9c43688 commit dda7ec2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 2 additions & 7 deletions client/react-native/Dockerfile
Expand Up @@ -3,27 +3,22 @@ FROM node:10.10.0-alpine

# Create needed directories
RUN mkdir -p /usr/src/app
RUN mkdir /usr/src/app/web
RUN mkdir /usr/src/app/common

# Add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
ENV PATH /usr/src/app/web/node_modules/.bin:$PATH

# Install watchman
RUN mkdir /var/run/watchman
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk update && apk add --no-cache watchman@testing

# Install common dependencies
COPY common/schema.graphql /usr/src/app/common/schema.graphql
COPY .eslintrc /usr/src/app/.eslintrc
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
RUN cd /usr/src/app && yarn --silent

# Install web dependencies
COPY web/package.json /usr/src/app/web/package.json
COPY web/yarn.lock /usr/src/app/web/yarn.lock
COPY web /usr/src/app/web
RUN cd /usr/src/app/web && yarn --silent

# Start app
Expand Down
4 changes: 1 addition & 3 deletions client/react-native/docker-compose.yml
Expand Up @@ -7,9 +7,7 @@ services:
ports:
- "3001:3000"
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/web/node_modules
- ./common:/usr/src/app/common

tracer-service:
image: jaegertracing/all-in-one:1.6
Expand Down

0 comments on commit dda7ec2

Please sign in to comment.