-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
66 lines (55 loc) · 2.13 KB
/
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
FROM phusion/baseimage:0.9.22
# install server tools
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y apache2 && \
apt-get install -y varnish && \
apt-get install -y nginx && \
apt-get install -y sudo && \
apt-get install -y php7.0 && \
apt-get install -y php7.0-gd && \
apt-get install -y php7.0-curl && \
apt-get install -y php7.0-mbstring && \
apt-get install -y php7.0-dom && \
apt-get install -y php7.0-intl && \
apt-get install -y php7.0-mysql && \
apt-get install -y php7.0-zip && \
apt-get install -y libapache2-mod-php7.0 && \
apt-get install -y mysql-client && \
apt-get install -y composer
# server setting and start up scripts
COPY docker/etc/my_init.d/01_apache2.bash /etc/my_init.d/01_apache2.bash
COPY docker/etc/my_init.d/02_varnish.bash /etc/my_init.d/02_varnish.bash
COPY docker/etc/my_init.d/03_nginx.bash /etc/my_init.d/03_nginx.bash
COPY docker/etc/my_init.d/04_enhavo.bash /etc/my_init.d/04_enhavo.bash
RUN chmod 755 /etc/my_init.d/01_apache2.bash && \
chmod 755 /etc/my_init.d/02_varnish.bash && \
chmod 755 /etc/my_init.d/03_nginx.bash && \
chmod 755 /etc/my_init.d/04_enhavo.bash && \
a2enmod rewrite
# apache config
COPY docker/etc/apache2/ports.conf /etc/apache2/ports.conf
COPY docker/etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf
# nginx config
COPY docker/etc/sudo/sudoers /etc/sudoers
RUN rm -f /etc/nginx/sites-available/default && \
rm -f /etc/nginx/sites-enabled/default && \
cp -ra /etc/nginx /etc/nginx_default && \
chmod 440 /etc/sudoers
# varnish
COPY docker/etc/default/varnish /etc/default/varnish
# enhavo
COPY app /var/www/app
COPY src /var/www/src
COPY scripts /var/www/scripts
COPY web /var/www/web
COPY composer.json /var/www/composer.json
COPY composer.lock /var/www/composer.lock
WORKDIR /var/www
COPY docker/var/www/app/config/parameters.yml /var/www/app/config/parameters.yml
RUN chown -R www-data:www-data /var/www/* && \
composer install --no-scripts --no-dev --no-interaction
VOLUME ["/etc/nginx", "/etc/varnish", "/var/www"]
EXPOSE 8080
EXPOSE 80
EXPOSE 443