Compare commits
2 Commits
ce59badfe0
...
29aa1f2d40
Author | SHA1 | Date | |
---|---|---|---|
![]() |
29aa1f2d40 | ||
![]() |
69b7243685 |
@ -13,7 +13,7 @@ services:
|
||||
hostname: nginx-srv
|
||||
volumes:
|
||||
- ./mnt/place-config/etc/nginx:/mnt/place-config/etc/nginx # Config ready to be copied into the container.
|
||||
- ./nginx-srv/var/www:/var/www # Webpage public html.
|
||||
- ./nginx-srv/www:/var/www # Webpage public html.
|
||||
- ./nginx-srv/etc/letsencrypt:/etc/letsencrypt
|
||||
- ./multi-php-fpm-srv/run/php:/run/php # Socket files dir. It will be mounted and shared from the PHP container.
|
||||
|
||||
|
@ -3,7 +3,7 @@ FROM debian:bookworm
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y; apt-get install iputils-ping -y; apt-get install mariadb-server mariadb-client -y --download-only
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get install iputils-ping -y; apt-get autoclean -y; apt-get install mariadb-server mariadb-client -y --download-only
|
||||
|
||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||
COPY project/entrypoint/install-packages.sh /entrypoint/install-packages.sh
|
||||
|
@ -1,12 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
service mariadb start
|
||||
|
||||
chown -R mysql:mysql /run/mysql
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
|
||||
/bin/sh /entrypoint/install-packages.sh
|
||||
|
||||
chown -R mysql:mysql /run/mysqld
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
|
||||
service mariadb start
|
||||
|
||||
# Run the CMD that was passed (or default)
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
apt-get update; apt-get full-upgrade -y; apt-get install mariadb-server mariadb-client -y
|
||||
apt-get install -y mariadb-server mariadb-client
|
||||
|
@ -3,7 +3,7 @@ FROM debian:bookworm
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y && apt-get install iputils-ping -y
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get install vim curl iputils-ping -y; apt-get autoclean -y
|
||||
|
||||
COPY project/buildtime/sury-repo.sh /tmp/buildtime/sury-repo.sh
|
||||
RUN /bin/sh /tmp/buildtime/sury-repo.sh
|
||||
@ -12,9 +12,9 @@ ENV BUILDTIME_PHP_VER_INST="8.2"
|
||||
COPY project/buildtime/buildtime_php_ver_inst.sh /tmp/buildtime/buildtime_php_ver_inst.sh
|
||||
RUN /bin/sh /tmp/buildtime/buildtime_php_ver_inst.sh
|
||||
ENV DEF_PHP_INTERPRETER="8.2"
|
||||
ENV PHP_VERSIONS=
|
||||
|
||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||
COPY project/entrypoint/copy-config.sh /entrypoint/copy-config.sh
|
||||
COPY project/entrypoint/container-php-ver-inst.sh /entrypoint/container-php-ver-inst.sh
|
||||
COPY project/entrypoint/install-php-versions.sh /entrypoint/install-php-versions.sh
|
||||
COPY project/entrypoint/start-php-fpm.sh /entrypoint/start-php-fpm.sh
|
||||
|
4
multi-php-fpm-srv/project/entrypoint/copy-config.sh
Normal file
4
multi-php-fpm-srv/project/entrypoint/copy-config.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copy all .conf files from source to destination
|
||||
cp /mnt/place-config/etc/php/8.2/fpm/pool.d/*.conf /etc/php/8.2/fpm/pool.d/
|
@ -2,6 +2,8 @@
|
||||
|
||||
/bin/sh /entrypoint/container-php-ver-inst.sh
|
||||
/bin/sh /entrypoint/install-php-versions.sh
|
||||
/bin/sh /entrypoint/copy-config.sh
|
||||
|
||||
/bin/sh /entrypoint/start-php-fpm.sh
|
||||
|
||||
# Run the CMD that was passed (or default)
|
||||
|
@ -1,10 +1,11 @@
|
||||
FROM debian:bookworm
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y; apt-get install nginx certbot python3-certbot-nginx openssl vim curl iputils-ping -y --download-only
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y; apt-get install -y vim curl iputils-ping; apt-get install -y nginx certbot python3-certbot-nginx openssl --download-only
|
||||
|
||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||
COPY project/entrypoint/copy-config.sh /entrypoint/copy-config.sh
|
||||
COPY project/entrypoint/gen-cert.sh /entrypoint/gen-cert.sh
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]
|
||||
|
4
nginx-srv/project/entrypoint/copy-config.sh
Normal file
4
nginx-srv/project/entrypoint/copy-config.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copy all .conf files from source to destination
|
||||
cp /mnt/place-config/etc/nginx/sites-available/*.conf /etc/nginx/sites-available/
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# /mnt/place-config will be mounted/defined in docker-compose.yaml
|
||||
cp -r /mnt/place-config/etc/nginx/sites-available /etc/nginx/sites-available
|
@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
apt-get update; apt-get full-upgrade -y; apt-get install nginx certbot python3-certbot-nginx openssl vim curl iputils-ping -y; apt-get autoclean -y
|
||||
apt-get install -y nginx certbot python3-certbot-nginx openssl; apt-get autoclean -y
|
||||
|
||||
/bin/sh /entrypoint/gen-cert.sh
|
||||
/bin/sh /entrypoint/copy-config.sh
|
||||
service nginx start
|
||||
|
||||
# Run the CMD that was passed (or default)
|
||||
|
@ -4,11 +4,9 @@ mkdir -p /etc/ssl/certs
|
||||
mkdir -p /etc/ssl/private
|
||||
chmod 0710 /etc/ssl/private
|
||||
|
||||
# Generate a fresh cert every time
|
||||
# Generate a fresh self-signed cert every time
|
||||
apt-get install -y openssl
|
||||
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
||||
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \
|
||||
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
|
||||
-subj "/C=US/ST=Exam"
|
||||
|
||||
echo "Generated self-signed cert:"
|
||||
-subj "/C=ES/ST=Exam"
|
||||
|
23
nginx-srv/www/html/index.nginx-debian.html
Normal file
23
nginx-srv/www/html/index.nginx-debian.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to nginx!</title>
|
||||
<style>
|
||||
html { color-scheme: light dark; }
|
||||
body { width: 35em; margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to nginx!</h1>
|
||||
<p>If you see this page, the nginx web server is successfully installed and
|
||||
working. Further configuration is required.</p>
|
||||
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
||||
Commercial support is available at
|
||||
<a href="http://nginx.com/">nginx.com</a>.</p>
|
||||
|
||||
<p><em>Thank you for using nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user