2018-06-14 16:49:28 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
RUN docker-php-ext-install pdo pdo_mysql mysqli
|
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
|
|
|
|
|
COPY docker/php/apache2.conf /etc/apache2/
|
|
|
|
|
|
|
|
|
|
COPY backend /var/www/html
|
2018-06-18 17:01:37 +02:00
|
|
|
RUN rm /var/www/html/index.php
|
2018-06-14 16:49:28 +02:00
|
|
|
|
|
|
|
|
COPY frontend /home/wiaas/frontend
|
|
|
|
|
|
|
|
|
|
WORKDIR /home/wiaas/frontend
|
2018-06-18 17:01:37 +02:00
|
|
|
RUN npm install && npm rebuild node-sass --force && npm run build
|
2018-06-14 16:49:28 +02:00
|
|
|
RUN cp -r build/* /var/www/html/
|