forked from va-net/flare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (25 loc) · 803 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
FROM node:14-alpine AS build
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY . .
RUN yarn install --frozen-lockfile
RUN yarn run build
FROM php:8-apache AS final
# Install Required Extensions
RUN apt-get update && apt-get install -y libcurl3-dev libzip-dev zip
RUN docker-php-ext-install pdo_mysql curl zip
RUN a2enmod rewrite
# Copy Files
WORKDIR /var/www/html
COPY . .
RUN rm -rf assets/tailwind.*.css
COPY --from=build /app/assets/tailwind.index.css assets/
# Install dependencies
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
RUN composer install
# Set up files
RUN chown www-data:www-data -R /var/www/html/*
RUN chown www-data:www-data -R /var/www/html/.*
# Set up permissions
USER www-data
CMD php /var/www/html/core/docker_entrypoint.php && apache2-foreground