svg
This commit is contained in:
25
misc/docker/Dockerfile
Normal file
25
misc/docker/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
ARG NODE_VERSION=20.12.2
|
||||
FROM node:${NODE_VERSION}-alpine AS node
|
||||
|
||||
FROM reg.cadoles.com/envole/nineapache:7.4
|
||||
COPY ./misc/docker/apache.conf /etc/apache2/conf.d/zapp.conf
|
||||
|
||||
COPY --from=node /usr/lib /usr/lib
|
||||
COPY --from=node /usr/local/lib /usr/local/lib
|
||||
COPY --from=node /usr/local/include /usr/local/include
|
||||
COPY --from=node /usr/local/bin /usr/local/bin
|
||||
|
||||
RUN npm install -g yarn --force
|
||||
RUN composer self-update --1
|
||||
|
||||
RUN echo "* * * * * /app/bin/console app:Cron --env=prod" >> /var/spool/cron/crontabs/root
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn install
|
||||
RUN export NODE_OPTIONS=--openssl-legacy-provider && yarn build
|
||||
RUN rm -rf node_modules
|
||||
RUN composer install
|
||||
|
||||
CMD /app/misc/script/reconfigure.sh && /etc/apache2/apache2.sh
|
19
misc/docker/apache.conf
Executable file
19
misc/docker/apache.conf
Executable file
@@ -0,0 +1,19 @@
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
ServerName nineapache.local
|
||||
DocumentRoot "/app/public"
|
||||
Alias /schedule /app/public
|
||||
<Directory "/app/public">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
|
||||
RewriteRule .* - [E=BASE:%1]
|
||||
RewriteCond %{HTTP:Authorization} .+
|
||||
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
RewriteCond %{ENV:REDIRECT_STATUS} =""
|
||||
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ %{ENV:BASE}/index.php [L]
|
||||
</Directory>
|
Reference in New Issue
Block a user