85 lines
2.5 KiB
Docker
85 lines
2.5 KiB
Docker
FROM ubuntu:20.04
|
|
MAINTAINER rocho02@gmail.com
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=Europe/Budapest
|
|
|
|
# apt-get
|
|
RUN apt-get update \
|
|
&& apt-get -y install bzip2 git nano wget zip unzip curl vim build-essential \
|
|
&& apt-get -y install libmcrypt-dev libzzip-dev zziplib-bin zlib1g-dev \
|
|
&& apt-get -y install apache2
|
|
|
|
RUN apt-get -y install php \
|
|
libapache2-mod-php \
|
|
php-mysql \
|
|
php-xml \
|
|
php-gd \
|
|
php-mbstring \
|
|
php-zip \
|
|
php-soap \
|
|
php-curl \
|
|
php-pear \
|
|
php-dev \
|
|
libmcrypt-dev
|
|
|
|
#RUN pecl channel-update pecl.php.net \
|
|
# && pecl update-channels \
|
|
# && pecl install mcrypt
|
|
|
|
RUN pecl install mcrypt
|
|
|
|
|
|
RUN apt-get -y install \
|
|
# Required by composer
|
|
git \
|
|
zlib1g-dev \
|
|
--no-install-recommends
|
|
|
|
# Install composer
|
|
COPY install-composer /install-composer
|
|
RUN /install-composer && rm /install-composer
|
|
|
|
RUN a2enmod headers
|
|
RUN a2enmod rewrite
|
|
|
|
COPY 000-default.conf /etc/apache2/sites-available/
|
|
|
|
COPY index.html /var/www/html/
|
|
|
|
COPY apache2.conf /etc/apache2/
|
|
|
|
RUN apt install -y certbot python3-certbot-apache
|
|
|
|
# Ports
|
|
EXPOSE 80
|
|
|
|
|
|
# Default command
|
|
CMD ["apachectl", "-D", "FOREGROUND"]
|
|
|
|
ENV FITNESS_DB_HOST="" \
|
|
FITNESS_DB_NAME="" \
|
|
FITNESS_DB_PORT="" \
|
|
FITNESS_DB_USERNAME="" \
|
|
FITNESS_DB_PASSWORD="" \
|
|
FITNESS_MAIL_HOST="" \
|
|
FITNESS_MAIL_PORT="" \
|
|
FITNESS_MAIL_USERNAME="" \
|
|
FITNESS_MAIL_PASSWORD=""
|
|
|
|
ADD data/cutlerimagevendor.tar.gz /data/
|
|
ADD data/cutlerimagecontent.tar.gz /var/www/html/
|
|
RUN mv /var/www/html/fitness_web /var/www/html/cutler
|
|
RUN ln -sf /data/vendor /var/www/html/cutler/vendor
|
|
ADD config /config
|
|
#overwrite configs
|
|
RUN find /config/common/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/common/config/ \; \
|
|
&& find /config/backend/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/backend/config/ \; \
|
|
&& find /config/frontend/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/frontend/config/ \; \
|
|
&& find /config/console/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/console/config/ \; \
|
|
&& find /config/mobileapi/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/mobileapi/config/ \; \
|
|
&& find /config/rest/ -maxdepth 2 -type f -name '*-local.php' -exec cp {} /var/www/html/cutler/rest/config/ \;
|
|
|
|
|