website/Dockerfile

28 lines
842 B
Text
Raw Normal View History

2021-05-13 23:15:00 +02:00
# Bootstrap SCSS
2021-09-08 21:05:30 +02:00
FROM node:lts-alpine AS buildJS
2021-01-11 14:10:09 +01:00
WORKDIR /build
2021-09-26 00:12:02 +02:00
COPY . .
RUN mkdir public/js
RUN mkdir public/css
2021-02-28 12:23:22 +01:00
RUN yarn install
RUN yarn compile
2021-01-11 14:10:09 +01:00
2021-05-14 23:06:49 +02:00
# Install PHP dependencies
2021-09-08 21:05:51 +02:00
FROM composer:2 AS composer
2021-05-13 23:15:00 +02:00
WORKDIR /build
2021-09-26 00:21:14 +02:00
COPY --from=buildJS /build/public .
RUN cd API && composer install
2021-05-13 23:15:00 +02:00
2021-01-11 14:10:09 +01:00
# Prepare Webserver
2021-08-16 20:52:04 +02:00
FROM gitlab.jonasled.de/jonasled/apache-php-minimal:latest
2020-12-28 22:36:25 +01:00
# |--------------------------------------------------------------------------
2021-08-16 17:11:03 +02:00
# | install dependencies
2020-12-28 22:36:25 +01:00
# |--------------------------------------------------------------------------
2021-08-16 17:11:03 +02:00
RUN apk update && \
2021-09-08 21:04:54 +02:00
apk add php8-mysqli php8-mbstring curl --no-cache
2021-01-02 11:43:54 +01:00
# |--------------------------------------------------------------------------
2021-03-24 23:46:18 +01:00
# | copy website from node build
2021-01-02 11:43:54 +01:00
# |--------------------------------------------------------------------------
2021-09-26 00:21:14 +02:00
COPY --from=composer /build/ .