Docker reorganisation (#6)

* - new file location for docker

* update of docker containers

* update readme
This commit is contained in:
2023-03-07 23:45:45 +01:00
committed by GitHub
parent 36a355f604
commit 7e242d5aa2
10 changed files with 140 additions and 92 deletions

View File

@@ -1,27 +0,0 @@
FROM php:8.0-fpm
ARG USER_UID
ARG USER_NAME
ENV COMPOSER_HOME=/home/$USER_NAME/.composer
RUN useradd -G www-data,root -u $USER_UID -d /home/$USER_NAME $USER_NAME
RUN mkdir -p /home/$USER_NAME/.composer && \
chown $USER_NAME:$USER_NAME -R /home/$USER_NAME
RUN set -eux \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install git zip unzip dos2unix -y
RUN curl -sS https://getcomposer.org/installer \
| php -- --version=2.3.5 --install-dir=/usr/local/bin --filename=composer
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN set -eux \
&& apt-get install nodejs -y
RUN npm install --global npm@latest
COPY ./install.sh /usr/local/bin/install
RUN dos2unix /usr/local/bin/install \
&& chmod +x /usr/local/bin/install
USER $USER_UID
EXPOSE 9000

View File

@@ -1,28 +0,0 @@
#!/bin/sh
if [ ! -d "vendor" ] && [ -f "composer.json" ]; then
echo ""
echo "########################################"
echo "# vendor directory not found... #"
echo "########################################"
composer install \
&& php artisan key:generate
if [ ! -f "database/database.sqlite" ]; then
touch database/database.sqlite
fi
php artisan migrate:fresh --seed
fi
if [ ! -d "node_modules" ] && [ -f "package.json" ]; then
echo ""
echo "########################################"
echo "# node_modules directory not found... #"
echo "########################################"
npm install
npm run dev
fi
echo "$@"
exec "$@"

View File

@@ -1,21 +0,0 @@
server {
listen 80 default_server;
index index.php index.html;
root /application/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass laravel:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
}