forked from scieloorg/scielo.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev
38 lines (29 loc) · 1.3 KB
/
Dockerfile-dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM ubuntu:18.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 \
libapache2-mod-php php-gd php-curl php-memcached curl python-setuptools \
python-pip php-sqlite3 php-xml php-mbstring php-cli \
language-pack-pt language-pack-en-base language-pack-es \
libicu-dev php-intl && \
rm -rf /var/lib/apt/lists/* && \
pip install supervisor
RUN a2enmod php7.2
RUN a2enmod rewrite
RUN cp /etc/apache2/mods-available/expires.load /etc/apache2/mods-enabled/
RUN sed -i 's/memory_limit\ =\ 128M/memory_limit\ =\ 2G/g' /etc/php/7.2/apache2/php.ini
RUN sed -i 's/\;date\.timezone\ =/date\.timezone\ =\ America\/Sao_Paulo/g' /etc/php/7.2/apache2/php.ini
RUN sed -i 's/display_errors\ =\ On/display_errors\ =\ Off/g' /etc/php/7.2/apache2/php.ini
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV CI_ENV production
ADD docker/apache-config.conf /etc/apache2/sites-enabled/000-default.conf
ADD docker/foreground.sh /etc/apache2/foreground.sh
ADD docker/supervisord.conf /etc/supervisord.conf
RUN chmod 755 /etc/apache2/foreground.sh
RUN mkdir /var/log/supervisor/
WORKDIR /var/www/site
EXPOSE 80
CMD ["supervisord" , "-n", "-c", "/etc/supervisord.conf"]