2021-05-13 23:15:00 +02:00
|
|
|
# Bootstrap SCSS
|
|
|
|
FROM node:latest AS buildJS
|
2021-01-11 14:10:09 +01:00
|
|
|
WORKDIR /build
|
|
|
|
COPY . /build
|
2021-01-11 20:20:57 +01:00
|
|
|
RUN mkdir /build/public/js
|
2021-01-12 09:41:03 +01:00
|
|
|
RUN mkdir /build/public/css
|
2021-02-28 12:23:22 +01:00
|
|
|
RUN yarn install
|
2021-02-28 11:48:25 +01:00
|
|
|
RUN yarn compile
|
2021-01-11 14:10:09 +01:00
|
|
|
|
2021-05-13 23:15:00 +02:00
|
|
|
# Bootstrap SCSS + TS
|
|
|
|
FROM composer:latest AS composer
|
|
|
|
WORKDIR /build
|
|
|
|
COPY --from=build /build /build
|
|
|
|
RUN cd /build/public/API
|
|
|
|
RUN composer install
|
|
|
|
|
2021-01-11 14:10:09 +01:00
|
|
|
# Prepare Webserver
|
2021-03-24 23:46:18 +01:00
|
|
|
FROM php:8-apache-buster
|
2020-12-28 22:36:25 +01:00
|
|
|
|
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
# | install php extensions
|
2020-12-28 22:36:25 +01:00
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
RUN docker-php-ext-install mysqli
|
2020-12-28 22:36:25 +01:00
|
|
|
|
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
# | enable production php ini
|
2020-12-28 22:36:25 +01:00
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
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-05-13 23:15:00 +02:00
|
|
|
COPY --from=composer /build/public /var/www/html
|
2020-12-28 22:36:25 +01:00
|
|
|
|
2021-03-25 15:44:16 +01:00
|
|
|
# |--------------------------------------------------------------------------
|
|
|
|
# | enable apache modules
|
|
|
|
# |--------------------------------------------------------------------------
|
|
|
|
RUN a2enmod headers rewrite
|
|
|
|
|
2021-01-02 11:43:54 +01:00
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
# | expose http port
|
2020-12-28 22:36:25 +01:00
|
|
|
# |--------------------------------------------------------------------------
|
2021-03-24 23:46:18 +01:00
|
|
|
EXPOSE 80
|