website/Dockerfile

28 lines
No EOL
894 B
Docker

# Bootstrap SCSS
FROM node:latest AS buildJS
WORKDIR /build
COPY . /build
RUN mkdir /build/public/js
RUN mkdir /build/public/css
RUN yarn install
RUN yarn compile
# Install PHP dependencies
FROM composer:latest AS composer
WORKDIR /build
COPY --from=buildJS /build /build
RUN cd /build/public/API && composer install
# Prepare Webserver
FROM gitlab.jonasled.de/jonasled/apache-php-minimal:latest
# |--------------------------------------------------------------------------
# | install dependencies
# |--------------------------------------------------------------------------
RUN apk update && \
apk add php8-mysqli php8-mbstring curl
# |--------------------------------------------------------------------------
# | copy website from node build
# |--------------------------------------------------------------------------
COPY --from=composer /build/public /var/www/localhost/htdocs/