diff --git "a/multi-php-fpm/\033" "b/multi-php-fpm/\033" deleted file mode 100644 index 52f60be..0000000 --- "a/multi-php-fpm/\033" +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "Id": "sha256:a65828b6d88c876759feb944bed252a55643132fe70760e11fb44fd20d15c63d", - "RepoTags": [ - "eroncero/multi-php-fpm:latest" - ], - "RepoDigests": [ - "eroncero/multi-php-fpm@sha256:bd16ad0ed424ccf3ac3b5691e98323c05a1bc934763f21727b9f5414967b0c2c" - ], - "Parent": "", - "Comment": "buildkit.dockerfile.v0", - "Created": "2025-07-18T09:48:23.178620148+02:00", - "DockerVersion": "", - "Author": "", - "Architecture": "amd64", - "Os": "linux", - "Size": 401820621, - "GraphDriver": { - "Data": { - "LowerDir": "/var/lib/docker/overlay2/2wkqxeyg64hp5ejv7ma6w5ep2/diff:/var/lib/docker/overlay2/x4cxn5phr6od1f1uq1yzulk8z/diff:/var/lib/docker/overlay2/pet8uvu8218sogs8ofit1q0di/diff:/var/lib/docker/overlay2/130eh7cojn9r8ki2s1j5asw9f/diff:/var/lib/docker/overlay2/5c8pk9i6o9z4mxec9jiiprxd3/diff:/var/lib/docker/overlay2/09mt4vxgjj3ig1bexibjeanga/diff:/var/lib/docker/overlay2/xewmj6oiq6lzspv4w3xhvo9ny/diff:/var/lib/docker/overlay2/7c3b8ed9007adb6c3489bd8ff178bd770eeb3636c8a0ff4a4aae726553441999/diff", - "MergedDir": "/var/lib/docker/overlay2/wz21c7vpo3d6mrm3p50pmhj9g/merged", - "UpperDir": "/var/lib/docker/overlay2/wz21c7vpo3d6mrm3p50pmhj9g/diff", - "WorkDir": "/var/lib/docker/overlay2/wz21c7vpo3d6mrm3p50pmhj9g/work" - }, - "Name": "overlay2" - }, - "RootFS": { - "Type": "layers", - "Layers": [ - "sha256:385eb556134e17ef23cfd59b33526dddab1776f743b3713ff9a08a484ece4aaa", - "sha256:28feb87c8e9f0704fb966b7d4f9312b6ba7b2fa177876a5365eaeff2b605e086", - "sha256:7e610e78b5fca3c1e059639ef5c55a10645d090e4b72e0376a96b9bfd8e4329f", - "sha256:ba95656614608af4c603b97734322fec310e2b22b93ac34df79815b72e6b68ae", - "sha256:1a1ee9d2e071a34ffb5e78d9d69e9ba8366468a6793e3ad2315d536f4b60c126", - "sha256:2b4d7980cbecf898920145dc47c4e38a45789b722200fb2e0bc606fd37cfe811", - "sha256:9833f315a0741dfba0e03f1c9eddbc6c438c63c9f19b8a5fdf65e53fdf423de5", - "sha256:ca6b2752c5bfd1bb2725ef86a507e59e774092cc7da117cad978e4b849f8fefa", - "sha256:84d3d0824c5990914b462135cde726345e477a423bca287858ae82abeebe374c" - ] - }, - "Metadata": { - "LastTagTime": "2025-07-18T10:35:28.56745103+02:00" - }, - "Config": { - "Cmd": null, - "Entrypoint": [ - "/bin/sh", - "/entrypoint/entrypoint.sh" - ], - "Env": [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", - "BUILDTIME_PHP_VER_INST=8.2", - "DEF_PHP_INTERPRETER=8.2" - ], - "Labels": null, - "OnBuild": null, - "User": "", - "Volumes": null, - "WorkingDir": "" - } - } -] diff --git a/nginx-srv/Dockerfile b/nginx-srv/Dockerfile index cb463ac..668d32d 100644 --- a/nginx-srv/Dockerfile +++ b/nginx-srv/Dockerfile @@ -1,10 +1,9 @@ FROM debian:bookworm -RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y - -COPY project/buildtime/gen_selfisgned_cert.sh /tmp/buildtime/gen_selfisgned_cert.sh -RUN /bin/sh /tmp/buildtime/gen_selfsigned_cert.sh +RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y; apt-get install nginx openssl vim curl -y COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh -COPY project/entrypoint/install-nginx-mods.sh /entrypoint/install-nginx-mods.sh +COPY project/entrypoint/gen-cert.sh /entrypoint/gen-cert.sh +#COPY project/entrypoint/install-nginx-mods.sh /entrypoint/install-nginx-mods.sh +RUN mkdir /tmp/buildtime && cp /etc/nginx/sites-available/default /tmp/buildtime/default ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"] diff --git a/nginx-srv/docker-compose.yaml b/nginx-srv/docker-compose.yaml new file mode 100644 index 0000000..b2feea2 --- /dev/null +++ b/nginx-srv/docker-compose.yaml @@ -0,0 +1,9 @@ +services: + nginx-srv: + image: eroncero/nginx-srv + ports: + - "127.0.0.1:8888:80" + - "[::1]:8843:443" + restart: unless-stopped + volumes: + - ./sites-available:/etc/nginx/sites-available diff --git a/nginx-srv/project/entrypoint/entrypoint.sh b/nginx-srv/project/entrypoint/entrypoint.sh new file mode 100644 index 0000000..3b90eb4 --- /dev/null +++ b/nginx-srv/project/entrypoint/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +/bin/sh /entrypoint/gen-cert.sh + +for file in /etc/nginx/sites-available/*.conf; do + sudo ln -s "$file" "/etc/nginx/sites-enabled/" +done + +mv /tmp/buildtime/default /etc/nginx/sites-available/default + +service nginx start + +tail -f /dev/null diff --git a/nginx-srv/entrypoint/cert.sh b/nginx-srv/project/entrypoint/gen-cert.sh similarity index 77% rename from nginx-srv/entrypoint/cert.sh rename to nginx-srv/project/entrypoint/gen-cert.sh index eaf8c48..99ea748 100644 --- a/nginx-srv/entrypoint/cert.sh +++ b/nginx-srv/project/entrypoint/gen-cert.sh @@ -1,3 +1,8 @@ +#!/bin/sh + +mkdir -p /etc/ssl/certs +mkdir -p /etc/ssl/private +chmod 0710 /etc/ssl/private # Generate a fresh cert every time openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \ @@ -8,4 +13,3 @@ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \ echo "Generated self-signed cert:" ls -l /etc/ssl/private/ ls -l /etc/ssl/certs/ -### diff --git a/nginx-srv/sites-available/default b/nginx-srv/sites-available/default new file mode 100644 index 0000000..c5af914 --- /dev/null +++ b/nginx-srv/sites-available/default @@ -0,0 +1,91 @@ +## +# You should look at the following URL's in order to grasp a solid understanding +# of Nginx configuration files in order to fully unleash the power of Nginx. +# https://www.nginx.com/resources/wiki/start/ +# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ +# https://wiki.debian.org/Nginx/DirectoryStructure +# +# In most cases, administrators will remove this file from sites-enabled/ and +# leave it as reference inside of sites-available where it will continue to be +# updated by the nginx packaging team. +# +# This file will automatically load configuration files provided by other +# applications, such as Drupal or Wordpress. These applications will be made +# available underneath a path with that package name, such as /drupal8. +# +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. +## + +# Default server configuration +# +server { + listen 80 default_server; + listen [::]:80 default_server; + + # SSL configuration + # + # listen 443 ssl default_server; + # listen [::]:443 ssl default_server; + # + # Note: You should disable gzip for SSL traffic. + # See: https://bugs.debian.org/773332 + # + # Read up on ssl_ciphers to ensure a secure configuration. + # See: https://bugs.debian.org/765782 + # + # Self signed certs generated by the ssl-cert package + # Don't use them in a production server! + # + # include snippets/snakeoil.conf; + + root /var/www/html; + + # Add index.php to the list if you are using PHP + index index.html index.htm index.nginx-debian.html; + + server_name _; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } + + # pass PHP scripts to FastCGI server + # + #location ~ \.php$ { + # include snippets/fastcgi-php.conf; + # + # # With php-fpm (or other unix sockets): + # fastcgi_pass unix:/run/php/php7.4-fpm.sock; + # # With php-cgi (or other tcp sockets): + # fastcgi_pass 127.0.0.1:9000; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + + +# Virtual Host configuration for example.com +# +# You can move that to a different file under sites-available/ and symlink that +# to sites-enabled/ to enable it. +# +#server { +# listen 80; +# listen [::]:80; +# +# server_name example.com; +# +# root /var/www/example.com; +# index index.html; +# +# location / { +# try_files $uri $uri/ =404; +# } +#}