2021-09-26 00:24:09 +02:00
|
|
|
# |--------------------------------------------------------------------------
|
|
|
|
# | Build SCSS and JS
|
|
|
|
# |--------------------------------------------------------------------------
|
2022-02-21 11:51:56 +01:00
|
|
|
FROM docker-proxy.jonasled.de/library/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
|
2022-02-25 16:08:23 +01:00
|
|
|
RUN yarn install --network-timeout 1000000
|
2022-03-08 08:57:52 +01:00
|
|
|
RUN yarn build
|
2021-01-11 14:10:09 +01:00
|
|
|
|
2021-09-26 00:24:09 +02:00
|
|
|
# |--------------------------------------------------------------------------
|
|
|
|
# | Install PHP dependencies
|
|
|
|
# |--------------------------------------------------------------------------
|
2022-02-21 11:51:56 +01:00
|
|
|
FROM docker-proxy.jonasled.de/library/composer:2 AS composer
|
2021-05-13 23:15:00 +02:00
|
|
|
WORKDIR /build
|
2021-10-30 08:46:06 +02:00
|
|
|
COPY --from=buildJS /build .
|
|
|
|
RUN composer install
|
2021-05-13 23:15:00 +02:00
|
|
|
|
2021-09-26 00:24:43 +02:00
|
|
|
# |--------------------------------------------------------------------------
|
|
|
|
# | Install Webserver
|
|
|
|
# |--------------------------------------------------------------------------
|
2022-03-25 12:17:45 +01:00
|
|
|
FROM gitlab.jonasled.de/jonasled/nginx-php-minimal:8-latest as production
|
2022-03-30 18:46:25 +02:00
|
|
|
ENV PHP_FILE_UPLOADS=Off \
|
|
|
|
PHP_MAX_POST=1M
|
|
|
|
|
2022-02-25 09:53:20 +01:00
|
|
|
|
2021-08-16 17:11:03 +02:00
|
|
|
RUN apk update && \
|
2022-01-18 20:45:29 +01:00
|
|
|
apk add php8-mysqli php8-mbstring php8-curl php8-simplexml --no-cache && \
|
|
|
|
rm /etc/nginx/http.d/default.conf
|
2022-03-25 12:17:45 +01:00
|
|
|
|
2021-11-25 13:13:35 +01:00
|
|
|
COPY --from=composer /build/public .
|
2022-01-18 20:45:29 +01:00
|
|
|
COPY ./nginx.conf /etc/nginx/http.d/default.conf
|