Files
old-wiaas-legacy/php.dockerfile

66 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

2018-06-11 19:02:26 +02:00
FROM php:7.0-apache
#for frontend config
ENV REACT_APP_TEST_URL=http://localhost:8000/api-wiaas \
REACT_APP_PROD_URL=http://localhost:8000/api-wiaas \
2018-06-26 13:57:59 +02:00
REACT_APP_DEV_URL=http://legacy.wiaas.saburly.com/api-wiaas
2018-06-11 19:02:26 +02:00
#for api-wiaas config
2018-06-26 13:57:59 +02:00
ENV WIAAS_URL=http://legacy.wiaas.saburly.com
ENV DB_SERVER=db \
DB_NAME=ricoh_dash \
DB_USER=developer \
DB_PASS=developer
#for phinx config
ENV DEV_DB_HOST=db \
DEV_DB_NAME=ricoh_dash \
DEV_DB_USER=developer \
2018-06-26 13:47:39 +02:00
DEV_DB_PASS=developer \
DEV_DB_PORT=3306
ENV PROD_DB_HOST=db \
PROD_DB_NAME=ricoh_dash \
PROD_DB_USER=developer \
2018-06-26 13:47:39 +02:00
PROD_DB_PASS=developer \
DEV_DB_PORT=3306
ENV TEST_DB_HOST=db \
TEST_DB_NAME=ricoh_dash \
TEST_DB_USER=developer \
2018-06-26 13:47:39 +02:00
TEST_DB_PASS=developer \
DEV_DB_PORT=3306
2018-06-26 13:47:39 +02:00
RUN apt-get update && apt-get install -y git unzip gnupg mysql-client
2018-06-12 23:15:37 +02:00
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
2018-06-11 19:19:29 +02:00
2018-06-11 19:02:26 +02:00
COPY docker/php/apache2.conf /etc/apache2/
COPY docker/php/composer.phar /usr/local/bin/composer
2018-06-26 13:47:39 +02:00
COPY docker/php/startup.sh /init-scripts/
2018-06-11 19:02:26 +02:00
2018-06-26 13:47:39 +02:00
RUN chmod 755 /usr/local/bin/composer && chmod +x /init-scripts/startup.sh
2018-06-11 19:02:26 +02:00
COPY api-wiaas /home/wiaas/api-wiaas
COPY client-wiaas /home/wiaas/client-wiaas
WORKDIR /home/wiaas/api-wiaas/
2018-06-25 16:58:46 +02:00
RUN composer install
2018-06-11 19:02:26 +02:00
WORKDIR /home/wiaas
RUN cp -r api-wiaas /var/www/html/
WORKDIR /home/wiaas/client-wiaas
RUN npm rebuild node-sass --force
RUN npm install && npm run build
RUN cp -r build/* /var/www/html/
2018-06-26 13:47:39 +02:00
COPY docker/php/.htaccess /var/www/html/
RUN chown -R www-data:www-data /var/www/html
2018-06-26 13:47:39 +02:00
CMD /init-scripts/startup.sh