forked from parti-renaissance/espace-adherent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod.common.dockerfile
79 lines (65 loc) · 2.12 KB
/
prod.common.dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM ubuntu:16.04
ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8" \
TERM="xterm" \
DEBIAN_FRONTEND="noninteractive" \
COMPOSER_ALLOW_SUPERUSER=1
EXPOSE 80
WORKDIR /app
RUN apt-get update -q && \
apt-get install -qy software-properties-common language-pack-en-base && \
export LC_ALL=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
add-apt-repository -y ppa:ondrej/php && \
apt-get update -q && \
apt-get install --no-install-recommends -qy \
ca-certificates \
cron \
curl \
nano \
nginx \
git \
mysql-client \
php7.1 \
php7.1-bcmath \
php7.1-common \
php7.1-curl \
php7.1-dom \
php7.1-fpm \
php7.1-gd \
php7.1-iconv \
php7.1-intl \
php7.1-json \
php7.1-mbstring \
php7.1-mcrypt \
php7.1-mysql \
php7.1-opcache \
php7.1-pdo \
php7.1-phar \
php7.1-xml \
php7.1-zip \
redis-server \
supervisor \
tzdata \
wget && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
cp /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo "Europe/Paris" > /etc/timezone && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . /app
RUN chmod 0444 gcloud-service-key.json && \
mkdir /run/php && \
mkdir var && \
service redis-server start && \
SYMFONY_ENV=prod REDIS_HOST=127.0.0.1 composer install --optimize-autoloader --no-interaction --no-ansi --no-dev && \
service redis-server stop && \
apt-get autoremove -y redis-server && \
chown -R www-data:www-data var && \
mv docker/prod/php.ini /etc/php/7.1/cli/conf.d/50-setting.ini && \
rm -rf /etc/php/7.1/fpm/pool.d/www.conf && \
mv docker/prod/pool.conf /etc/php/7.1/fpm/pool.d/www.conf && \
rm -rf /etc/nginx/nginx.conf && \
mv docker/prod/nginx.conf /etc/nginx/nginx.conf && \
mv docker/prod/supervisord.conf /etc/supervisor/conf.d/ && \
rm -rf docker && \
rm -rf web/app_dev.php