reconverted to simple drupal env (we'll use progressive decoupling)
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
FROM node:lts-bookworm
|
||||
|
||||
# THE ALL USER THINGS IS USELESS AS NODE IS ALREADY A USER @ 1000
|
||||
|
||||
# RUN find / -group 1000 -exec chgrp -h node {} \;
|
||||
# RUN find / -user 1000 -exec chown -h node {} \;
|
||||
|
||||
# ARG USER_UID
|
||||
# ARG USER_UNAME
|
||||
# ARG USER_GID
|
||||
# ARG USER_GNAME
|
||||
|
||||
|
||||
# # RUN addgroup -g 1000 gdp && \
|
||||
# # adduser -h /home/gdp -D -u 1000 gdp && \
|
||||
# RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
|
||||
# # chown -R gdp:gdp /home/gdp
|
||||
|
||||
# RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi
|
||||
# RUN groupadd -g ${USER_GID} ${USER_GNAME}
|
||||
# RUN useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME}
|
||||
# RUN install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME}
|
||||
# RUN chown --changes --silent --no-dereference --recursive \
|
||||
# --from=33:33 ${USER_UID}:${USER_GID} \
|
||||
# /home/${USER_UNAME}
|
||||
|
||||
# USER ${USER_UNAME}
|
||||
|
||||
# COPY ./bashrc /home/${USER_UNAME}/.bashrc
|
||||
# COPY ./inputrc /home/${USER_UNAME}/.inputrc
|
||||
|
||||
# COPY ./bashrc /home/node/.bashrc # should do an echo in already existing /home/node/.bashcr
|
||||
COPY ./inputrc /home/node/.inputrc
|
||||
|
||||
COPY ./client-entrypoint.sh /usr/local/bin
|
||||
# USER root
|
||||
RUN chmod +x /usr/local/bin/client-entrypoint.sh
|
||||
# USER ${USER_UNAME}
|
||||
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
|
@@ -1,3 +0,0 @@
|
||||
PS1='\e[36m\e[1mNODE\e[0m:\e[90m\w\e[0m\n$ '
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
@@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat /etc/passwd|grep 1000
|
||||
|
||||
cd /app
|
||||
|
||||
echo "Cleaning node_modules"
|
||||
rm -rf node_modules
|
||||
|
||||
echo "Cleaning npm cache"
|
||||
npm cache clean --f
|
||||
|
||||
echo "Npm install"
|
||||
npm install
|
||||
|
||||
# echo "Npm init"
|
||||
# npm ci
|
||||
|
||||
|
||||
# echo "Run npm dev"
|
||||
# npm run dev
|
||||
echo "APP_ENV $APP_ENV"
|
||||
|
||||
if [ "$APP_ENV" = "prod" ]; then
|
||||
echo "Run npm prod"
|
||||
npm run build
|
||||
else
|
||||
echo "Run npm dev"
|
||||
npm run dev
|
||||
fi
|
@@ -1,2 +0,0 @@
|
||||
set show-all-if-ambiguous on
|
||||
set completion-ignore-case on
|
@@ -1,82 +1,35 @@
|
||||
upstream app{
|
||||
server app:3000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
# root /var/www/html/api/src/web;
|
||||
# root /var/www/html/app/dist;
|
||||
root /var/www/html/web;
|
||||
index index.html index.php;
|
||||
server_name *.caravane.fr;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_set_header X-Ssl on;
|
||||
proxy_cache off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_pass http://app;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# https://serversforhackers.com/c/nginx-php-in-subdirectory
|
||||
location @api {
|
||||
rewrite ^/api/(.*)$ /api/index.php;
|
||||
}
|
||||
|
||||
|
||||
location /api {
|
||||
# rewrite /api/(.*)$ /$1 break;
|
||||
# root /var/www/html/api/src/web;
|
||||
alias /var/www/html/api/src/web/;
|
||||
# index index.php;
|
||||
# try_files $uri $uri/ /index.php?$query_string;
|
||||
try_files $uri $uri/ @api;
|
||||
|
||||
error_log /var/log/nginx/api-error.log debug;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass api:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffers 16 32k;
|
||||
fastcgi_buffer_size 64k;
|
||||
fastcgi_busy_buffers_size 64k;
|
||||
fastcgi_read_timeout 150;
|
||||
}
|
||||
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log on;
|
||||
error_log /var/log/nginx/app-error.log error;
|
||||
error_log /var/log/nginx/api-error.log debug;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
# location ~ \.php$ {
|
||||
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
# fastcgi_pass api:9000;
|
||||
# fastcgi_index index.php;
|
||||
# include fastcgi_params;
|
||||
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
# fastcgi_intercept_errors off;
|
||||
# fastcgi_buffer_size 16k;
|
||||
# fastcgi_buffers 4 16k;
|
||||
# fastcgi_read_timeout 150;
|
||||
# }
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
|
Reference in New Issue
Block a user