Compare commits
No commits in common. "29aa1f2d40b5825ed1ad6a4eb3f2ad01951b6ab1" and "ce59badfe0f9cda808f55de46021d4cabcd59e57" have entirely different histories.
29aa1f2d40
...
ce59badfe0
@ -13,7 +13,7 @@ services:
|
|||||||
hostname: nginx-srv
|
hostname: nginx-srv
|
||||||
volumes:
|
volumes:
|
||||||
- ./mnt/place-config/etc/nginx:/mnt/place-config/etc/nginx # Config ready to be copied into the container.
|
- ./mnt/place-config/etc/nginx:/mnt/place-config/etc/nginx # Config ready to be copied into the container.
|
||||||
- ./nginx-srv/www:/var/www # Webpage public html.
|
- ./nginx-srv/var/www:/var/www # Webpage public html.
|
||||||
- ./nginx-srv/etc/letsencrypt:/etc/letsencrypt
|
- ./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.
|
- ./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 DEBIAN_FRONTEND=noninteractive
|
||||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||||
COPY project/entrypoint/install-packages.sh /entrypoint/install-packages.sh
|
COPY project/entrypoint/install-packages.sh /entrypoint/install-packages.sh
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
/bin/sh /entrypoint/install-packages.sh
|
service mariadb start
|
||||||
|
|
||||||
chown -R mysql:mysql /run/mysqld
|
chown -R mysql:mysql /run/mysql
|
||||||
chown -R mysql:mysql /var/lib/mysql
|
chown -R mysql:mysql /var/lib/mysql
|
||||||
|
|
||||||
|
/bin/sh /entrypoint/install-packages.sh
|
||||||
|
|
||||||
service mariadb start
|
service mariadb start
|
||||||
|
|
||||||
# Run the CMD that was passed (or default)
|
# Run the CMD that was passed (or default)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
apt-get install -y mariadb-server mariadb-client
|
apt-get update; apt-get full-upgrade -y; apt-get install mariadb-server mariadb-client -y
|
||||||
|
@ -3,7 +3,7 @@ FROM debian:bookworm
|
|||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
|
|
||||||
RUN apt-get update; apt-get full-upgrade -y; apt-get install vim curl iputils-ping -y; apt-get autoclean -y
|
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y && apt-get install iputils-ping -y
|
||||||
|
|
||||||
COPY project/buildtime/sury-repo.sh /tmp/buildtime/sury-repo.sh
|
COPY project/buildtime/sury-repo.sh /tmp/buildtime/sury-repo.sh
|
||||||
RUN /bin/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
|
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
|
RUN /bin/sh /tmp/buildtime/buildtime_php_ver_inst.sh
|
||||||
ENV DEF_PHP_INTERPRETER="8.2"
|
ENV DEF_PHP_INTERPRETER="8.2"
|
||||||
|
ENV PHP_VERSIONS=
|
||||||
|
|
||||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
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/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/install-php-versions.sh /entrypoint/install-php-versions.sh
|
||||||
COPY project/entrypoint/start-php-fpm.sh /entrypoint/start-php-fpm.sh
|
COPY project/entrypoint/start-php-fpm.sh /entrypoint/start-php-fpm.sh
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/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,8 +2,6 @@
|
|||||||
|
|
||||||
/bin/sh /entrypoint/container-php-ver-inst.sh
|
/bin/sh /entrypoint/container-php-ver-inst.sh
|
||||||
/bin/sh /entrypoint/install-php-versions.sh
|
/bin/sh /entrypoint/install-php-versions.sh
|
||||||
/bin/sh /entrypoint/copy-config.sh
|
|
||||||
|
|
||||||
/bin/sh /entrypoint/start-php-fpm.sh
|
/bin/sh /entrypoint/start-php-fpm.sh
|
||||||
|
|
||||||
# Run the CMD that was passed (or default)
|
# Run the CMD that was passed (or default)
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
FROM debian:bookworm
|
FROM debian:bookworm
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV DEBCONF_NONINTERACTIVE_SEEN=true
|
ARG DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
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
|
COPY project/entrypoint/gen-cert.sh /entrypoint/gen-cert.sh
|
||||||
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]
|
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Copy all .conf files from source to destination
|
|
||||||
cp /mnt/place-config/etc/nginx/sites-available/*.conf /etc/nginx/sites-available/
|
|
4
nginx-srv/project/entrypoint/copy-configs.sh
Normal file
4
nginx-srv/project/entrypoint/copy-configs.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/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,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
apt-get install -y nginx certbot python3-certbot-nginx openssl; apt-get autoclean -y
|
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
|
||||||
|
|
||||||
/bin/sh /entrypoint/gen-cert.sh
|
/bin/sh /entrypoint/gen-cert.sh
|
||||||
/bin/sh /entrypoint/copy-config.sh
|
|
||||||
service nginx start
|
service nginx start
|
||||||
|
|
||||||
# Run the CMD that was passed (or default)
|
# Run the CMD that was passed (or default)
|
||||||
|
@ -4,9 +4,11 @@ mkdir -p /etc/ssl/certs
|
|||||||
mkdir -p /etc/ssl/private
|
mkdir -p /etc/ssl/private
|
||||||
chmod 0710 /etc/ssl/private
|
chmod 0710 /etc/ssl/private
|
||||||
|
|
||||||
# Generate a fresh self-signed cert every time
|
# Generate a fresh cert every time
|
||||||
apt-get install -y openssl
|
apt-get install -y openssl
|
||||||
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
||||||
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \
|
-keyout /etc/ssl/private/ssl-cert-snakeoil.key \
|
||||||
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
|
-out /etc/ssl/certs/ssl-cert-snakeoil.pem \
|
||||||
-subj "/C=ES/ST=Exam"
|
-subj "/C=US/ST=Exam"
|
||||||
|
|
||||||
|
echo "Generated self-signed cert:"
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<!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