nginx working
This commit is contained in:
@@ -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": ""
|
||||
}
|
||||
}
|
||||
]
|
@@ -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"]
|
||||
|
9
nginx-srv/docker-compose.yaml
Normal file
9
nginx-srv/docker-compose.yaml
Normal file
@@ -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
|
13
nginx-srv/project/entrypoint/entrypoint.sh
Normal file
13
nginx-srv/project/entrypoint/entrypoint.sh
Normal file
@@ -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
|
@@ -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/
|
||||
###
|
91
nginx-srv/sites-available/default
Normal file
91
nginx-srv/sites-available/default
Normal file
@@ -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;
|
||||
# }
|
||||
#}
|
Reference in New Issue
Block a user