-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (27 loc) · 824 Bytes
/
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
FROM node:10 as build-assets
COPY package* ./
RUN npm ci
COPY gulpfile.js .
COPY assets assets
RUN node_modules/.bin/gulp
FROM php:7.3-apache
WORKDIR /var/www/
ENV PORT 80
EXPOSE $PORT
RUN apt-get update \
&& apt-get install -y \
libpq-dev \
unzip \
&& docker-php-ext-install \
opcache \
pdo_pgsql \
&& a2enmod rewrite \
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
COPY composer.* ./
RUN composer install --optimize-autoloader --prefer-dist --no-dev
COPY --from=build-assets html/app.js html
COPY --from=build-assets html/style.css html
COPY . .
RUN chown -R www-data:www-data .
CMD sed -i "s/80/$PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf \
&& docker-php-entrypoint apache2-foreground