website/Dockerfile
2022-03-08 08:57:52 +01:00

30 lines
1.1 KiB
Docker

# |--------------------------------------------------------------------------
# | Build SCSS and JS
# |--------------------------------------------------------------------------
FROM docker-proxy.jonasled.de/library/node:lts-alpine AS buildJS
WORKDIR /build
COPY . .
RUN mkdir public/js
RUN mkdir public/css
RUN yarn install --network-timeout 1000000
RUN yarn build
# |--------------------------------------------------------------------------
# | Install PHP dependencies
# |--------------------------------------------------------------------------
FROM docker-proxy.jonasled.de/library/composer:2 AS composer
WORKDIR /build
COPY --from=buildJS /build .
RUN composer install
# |--------------------------------------------------------------------------
# | Install Webserver
# |--------------------------------------------------------------------------
FROM gitlab.jonasled.de/jonasled/nginx-php-minimal:8-latest
ENV PHP_FILE_UPLOADS=Off
RUN apk update && \
apk add php8-mysqli php8-mbstring php8-curl php8-simplexml --no-cache && \
rm /etc/nginx/http.d/default.conf
COPY --from=composer /build/public .
COPY ./nginx.conf /etc/nginx/http.d/default.conf