website/Dockerfile
2022-01-28 23:25:46 +01:00

26 lines
1,014 B
Docker

# |--------------------------------------------------------------------------
# | Build SCSS and JS
# |--------------------------------------------------------------------------
FROM node:lts-alpine AS buildJS
WORKDIR /build
COPY . .
RUN yarn install
RUN yarn compile
# |--------------------------------------------------------------------------
# | Install PHP dependencies
# |--------------------------------------------------------------------------
FROM composer:2 AS composer
WORKDIR /build
COPY --from=buildJS /build/dist .
RUN composer install
# |--------------------------------------------------------------------------
# | Install Webserver
# |--------------------------------------------------------------------------
FROM gitlab.jonasled.de/jonasled/nginx-php-minimal:8-latest
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