seperate frontend and backend into different containers

This commit is contained in:
GotPPay
2018-06-19 05:10:21 +02:00
parent 2535eb0d25
commit 90f80facb2
5 changed files with 23 additions and 78 deletions

15
frontend.dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM php:7.0-apache
ENV REACT_APP_TEST_URL=http://localhost:8000/api-wiaas \
REACT_APP_PROD_URL=http://localhost:8000/api-wiaas \
REACT_APP_DEV_URL=http://next.wiaas.saburly.com/api-wiaas
RUN apt-get update && apt-get install -y git unzip gnupg
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
COPY frontend /home/wiaas/frontend
WORKDIR /home/wiaas/frontend
RUN npm install && npm rebuild node-sass --force && npm run build
RUN cp -r build/* /var/www/html/