Compare commits
35 Commits
18f27246e6
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
b7fe1b0bcc | ||
|
88a7f5b5f8 | ||
|
53de2d2533 | ||
|
1124d76045 | ||
|
b27aa50671 | ||
|
24f9633771 | ||
|
7727a0b4ef | ||
252abce5d3 | |||
|
96851e9a34 | ||
|
cb862c02b3 | ||
|
d3ba31c45e | ||
|
e70289ec06 | ||
|
a2bc8635bb | ||
|
9d85a8c4ed | ||
|
45d4912452 | ||
|
3763dfa570 | ||
|
4ee07ab7c5 | ||
|
6d5b7e3a2a | ||
|
e699967f5d | ||
|
7a573dd5ab | ||
|
bd83c46509 | ||
|
da7e24c9c6 | ||
|
430b4fef85 | ||
|
ac234fcf1f | ||
|
b30a0c664d | ||
|
95cca594e6 | ||
|
be64ac02ff | ||
|
7b12497e44 | ||
|
ff09c265a0 | ||
|
d3f68d261b | ||
|
532b686ae4 | ||
|
90001efc69 | ||
|
4c2e0adacb | ||
|
dd6b348e65 | ||
12e2b4b186 |
@ -11,10 +11,22 @@ jobs:
|
|||||||
- name: Install
|
- name: Install
|
||||||
run: curl -fsSL get.docker.com | bash
|
run: curl -fsSL get.docker.com | bash
|
||||||
- name: Clone
|
- name: Clone
|
||||||
run: git clone https://tgj.services/git/ThatGuyJack/php-fpm-docker.git .
|
run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git .
|
||||||
- name: Login
|
- name: Login
|
||||||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login 'tgj.services/git/' -u thatguyjack --password-stdin
|
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login https://git.tgj.services -u ThatGuyJack --password-stdin
|
||||||
- name: Build
|
- name: Buildx Container
|
||||||
run: docker build . -t tgj.services/git/ThatGuyJack/php-fpm:latest
|
run: docker buildx create --name buildx --driver=docker-container
|
||||||
- name: Push
|
- name: Build nginx-web
|
||||||
run: docker push tgj.services/git/ThatGuyJack/php-fpm:latest
|
run: docker buildx build --builder=buildx --platform=linux/amd64 ./nginx-web -t git.tgj.services/thatguyjack/nginx-web:latest --push
|
||||||
|
- name: Build php-8.1-CLI
|
||||||
|
run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-1-cli/ -t git.tgj.services/thatguyjack/php-cli:8.1 --push
|
||||||
|
- name: Build php8-1-FPM
|
||||||
|
run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-1-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.1 --push
|
||||||
|
- name: Build php-8-2-FPM
|
||||||
|
run: docker buildx build --builder=buildx --platform=linux/amd64 ./php-8-2-fpm/ -t git.tgj.services/thatguyjack/php-fpm:8.2 --push
|
||||||
|
# - name: Push
|
||||||
|
# run: |
|
||||||
|
# docker push git.tgj.services/thatguyjack/php-fpm:latest
|
||||||
|
# docker push git.tgj.services/thatguyjack/php-cli:latest
|
||||||
|
# docker push git.tgj.services/thatguyjack/nginx-web:latest
|
||||||
|
# docker push git.tgj.services/thatguyjack/motioneye:latest
|
20
Archive/php-8-2-cli/Dockerfile
Normal file
20
Archive/php-8-2-cli/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM php:8.2-cli
|
||||||
|
|
||||||
|
# installing cron package
|
||||||
|
RUN apt-get update && apt-get -y install cron libbz2-dev curl libcurl4-openssl-dev libxml2-dev libenchant-2-dev libssl-dev libpng-dev libgmp-dev libzip-dev sudo rsync zip unzip libldap2-dev
|
||||||
|
|
||||||
|
RUN pecl install redis && docker-php-ext-enable redis
|
||||||
|
|
||||||
|
RUN docker-php-ext-install pdo_mysql opcache gd zip ldap
|
||||||
|
|
||||||
|
COPY ./crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
#COPY ./petroq.service /etc/systemd/system
|
||||||
|
#RUN systemctl enable --now pteroq.service
|
||||||
|
RUN chmod 0644 /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN /usr/bin/crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN adduser -D -H -u 1000 -s /bin/bash www-data -G www-data
|
||||||
|
RUN usermod -u 1000 www-data
|
||||||
|
RUN groupmod -g 1000 www-data
|
20
Archive/php-8-2-cli/petroq.service
Normal file
20
Archive/php-8-2-cli/petroq.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Pterodactyl Queue Worker File
|
||||||
|
# ----------------------------------
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Pterodactyl Queue Worker
|
||||||
|
After=redis-server.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# On some systems the user and group might be different.
|
||||||
|
# Some systems use `apache` or `nginx` as the user and group.
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
|
||||||
|
StartLimitInterval=180
|
||||||
|
StartLimitBurst=30
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
58
motioneye/Dockerfile
Normal file
58
motioneye/Dockerfile
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
FROM debian:bullseye-slim
|
||||||
|
LABEL maintainer="Jack Brierley <jack@thatguyjack.co.uk>"
|
||||||
|
|
||||||
|
# By default, run as root
|
||||||
|
ARG RUN_UID=0
|
||||||
|
ARG RUN_GID=0
|
||||||
|
|
||||||
|
#insure git is installed
|
||||||
|
RUN apt-get update && apt install git cifs-utils -y
|
||||||
|
|
||||||
|
#Clone and install Repo
|
||||||
|
RUN git clone -b dev https://github.com/motioneye-project/motioneye.git /tmp/motioneye
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
RUN case "$(dpkg --print-architecture)" in \
|
||||||
|
'armhf') PACKAGES='python3-distutils'; printf '%b' '[global]\nextra-index-url=https://www.piwheels.org/simple/\n' > /etc/pip.conf;; \
|
||||||
|
*) PACKAGES='gcc libcurl4-openssl-dev libssl-dev python3-dev';; \
|
||||||
|
esac && \
|
||||||
|
apt-get -q update && \
|
||||||
|
DEBIAN_FRONTEND="noninteractive" apt-get -qq --option Dpkg::Options::="--force-confnew" --no-install-recommends install \
|
||||||
|
ca-certificates curl python3 fdisk $PACKAGES && \
|
||||||
|
curl -sSfO 'https://bootstrap.pypa.io/get-pip.py' && \
|
||||||
|
python3 get-pip.py
|
||||||
|
|
||||||
|
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
||||||
|
python3 -m pip install --no-cache-dir /tmp/motioneye && \
|
||||||
|
python3 -m pip install --no-cache-dir pytz && \
|
||||||
|
motioneye_init --skip-systemd --skip-apt-update
|
||||||
|
|
||||||
|
# Change uid/gid of user/group motion to match our desired IDs. This will
|
||||||
|
# make it easier to use execute motion as our desired user later.
|
||||||
|
RUN sed -i "s/^\(motion:[^:]*\):[0-9]*:[0-9]*:\(.*\)/\1:${RUN_UID}:${RUN_GID}:\2/" /etc/passwd && \
|
||||||
|
sed -i "s/^\(motion:[^:]*\):[0-9]*:\(.*\)/\1:${RUN_GID}:\2/" /etc/group && \
|
||||||
|
mv /etc/motioneye/motioneye.conf /etc/motioneye.conf.sample && \
|
||||||
|
mkdir /var/log/motioneye /var/lib/motioneye && \
|
||||||
|
chown motion:motion /var/log/motioneye /var/lib/motioneye
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
RUN python3 -m pip uninstall -y pip setuptools wheel && \
|
||||||
|
DEBIAN_FRONTEND="noninteractive" apt-get -qq autopurge $PACKAGES && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -r /var/lib/apt/lists /var/cache/apt /tmp/motioneye get-pip.py /root/.cache
|
||||||
|
|
||||||
|
#Set timezone
|
||||||
|
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
RUN date
|
||||||
|
|
||||||
|
|
||||||
|
# R/W needed for motionEye to update configurations
|
||||||
|
VOLUME /etc/motioneye
|
||||||
|
|
||||||
|
# Video & images
|
||||||
|
VOLUME /var/lib/motioneye
|
||||||
|
|
||||||
|
EXPOSE 8765
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
6
motioneye/entrypoint.sh
Normal file
6
motioneye/entrypoint.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# We need to chown at startup time since volumes are mounted as root. This is fugly.
|
||||||
|
mkdir -p /run/motioneye
|
||||||
|
chown motion:motion /run/motioneye
|
||||||
|
[ -f '/etc/motioneye/motioneye.conf' ] || cp -a /etc/motioneye.conf.sample /etc/motioneye/motioneye.conf
|
||||||
|
exec su -g motion motion -s /bin/dash -c "LANGUAGE=en exec /usr/local/bin/meyectl startserver -c /etc/motioneye/motioneye.conf"
|
15
nginx-web/Dockerfile
Normal file
15
nginx-web/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM nginx:latest
|
||||||
|
|
||||||
|
COPY ./snippets /etc/nginx/snippets/
|
||||||
|
|
||||||
|
COPY ./certs /certs/
|
||||||
|
|
||||||
|
COPY ./configs /etc/nginx/conf.d/
|
||||||
|
|
||||||
|
RUN usermod -u 1000 www-data \
|
||||||
|
&& groupmod -g 1000 www-data
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y gnupg
|
||||||
|
|
||||||
|
#RUN apt-get install smbclient -y
|
||||||
|
#CMD ["nginx", "-g", "--with-http_sub_module;"]
|
24
nginx-web/certs/certificate.pem
Normal file
24
nginx-web/certs/certificate.pem
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEGzCCAwOgAwIBAgIUQdWF5zctBdfEyFe7QypuABRsIU0wDQYJKoZIhvcNAQEL
|
||||||
|
BQAwgZwxCzAJBgNVBAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMRMwEQYDVQQHDApN
|
||||||
|
YW5jaGVzdGVyMR4wHAYDVQQKDBVUR0ogLSBJVCAmIE5ldHdvcmtpbmcxGjAYBgNV
|
||||||
|
BAMMEVRoYXRndXlqYWNrLmNvLnVrMSowKAYJKoZIhvcNAQkBFht3ZWJtYXN0ZXJA
|
||||||
|
dGhhdGd1eWphY2suY28udWswHhcNMjIwMjE2MjMwMzEzWhcNMjMwMjE2MjMwMzEz
|
||||||
|
WjCBnDELMAkGA1UEBhMCR0IxEDAOBgNVBAgMB0VuZ2xhbmQxEzARBgNVBAcMCk1h
|
||||||
|
bmNoZXN0ZXIxHjAcBgNVBAoMFVRHSiAtIElUICYgTmV0d29ya2luZzEaMBgGA1UE
|
||||||
|
AwwRVGhhdGd1eWphY2suY28udWsxKjAoBgkqhkiG9w0BCQEWG3dlYm1hc3RlckB0
|
||||||
|
aGF0Z3V5amFjay5jby51azCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
||||||
|
AM80QcD9WOxQTkoqpLZMcLpNH3kTX7RLWTQixoWoRP5+0FomMNcpIS1JGGazBXV5
|
||||||
|
nvjJn7HTN9eN7lSMYSlmW0k7aDSk+CoGoU4sHFqfmz/I6cfd16Hnw+BpO/TAb9sG
|
||||||
|
g2NExNhZ1rXNvaS+c7Np5rZxIAWDdr9kOnCaCQN3OgZT4iK8fQYEWGMqLkQ6MlAf
|
||||||
|
BcoQXw+V8mCCu/4EEjAC3N8dspJ73Lyly7hO/rp51u5CCYD0+2gSwlL0uNTg0Vr0
|
||||||
|
rxq5QXoXn9or6+AAVvSN/Hz855zxUqEWAjEq69E/Sk/BB23izQWkIPJuVQ5K+z5i
|
||||||
|
eLOVKUCmOKpDT8zRMY+lxlkCAwEAAaNTMFEwHQYDVR0OBBYEFAlh1aJY7ZUKIjTq
|
||||||
|
jXlHK7MwX/SEMB8GA1UdIwQYMBaAFAlh1aJY7ZUKIjTqjXlHK7MwX/SEMA8GA1Ud
|
||||||
|
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBADQdVSZbqJCE8TGdVIqJmjhH
|
||||||
|
XaV5cITG2eLohh1CxrW/tiXwXMV+YFUecCfOFJs9kiZTTCofQ2BUdYcOklklXfd5
|
||||||
|
FnCV77ckSgEPkBG2utbfufaHyaFjL7iYtjlbPHzYSK7ASYUTCJrWDqv2BhCIyoF2
|
||||||
|
C+0G1OEmyFpfLjzcuh0OdvnnkI0ojV1M2KbnYM0VdYNAYnwv467jZdK6zsJk+zqp
|
||||||
|
jqNokPyZXSP/2NKhocpCICfS0mUMmqV8XnBWCmUSskZbihoYO8x9kQEmm0q8MNbk
|
||||||
|
jnL5mmGgDOYOWGcqY7DnZXx8zFTGCYOZaXL0Llbz9/3PvYNw2kEyZp56EN883jA=
|
||||||
|
-----END CERTIFICATE-----
|
25
nginx-web/certs/fastcgi-php.conf
Normal file
25
nginx-web/certs/fastcgi-php.conf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param QUERY_STRING $query_string;
|
||||||
|
fastcgi_param REQUEST_METHOD $request_method;
|
||||||
|
fastcgi_param CONTENT_TYPE $content_type;
|
||||||
|
fastcgi_param CONTENT_LENGTH $content_length;
|
||||||
|
|
||||||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
|
fastcgi_param REQUEST_URI $request_uri;
|
||||||
|
fastcgi_param DOCUMENT_URI $document_uri;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||||
|
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||||
|
fastcgi_param REQUEST_SCHEME $scheme;
|
||||||
|
fastcgi_param HTTPS $https if_not_empty;
|
||||||
|
|
||||||
|
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||||
|
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||||
|
|
||||||
|
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||||
|
fastcgi_param REMOTE_PORT $remote_port;
|
||||||
|
fastcgi_param SERVER_ADDR $server_addr;
|
||||||
|
fastcgi_param SERVER_PORT $server_port;
|
||||||
|
fastcgi_param SERVER_NAME $server_name;
|
||||||
|
|
||||||
|
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||||
|
fastcgi_param REDIRECT_STATUS 200;
|
28
nginx-web/certs/key.pem
Normal file
28
nginx-web/certs/key.pem
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDPNEHA/VjsUE5K
|
||||||
|
KqS2THC6TR95E1+0S1k0IsaFqET+ftBaJjDXKSEtSRhmswV1eZ74yZ+x0zfXje5U
|
||||||
|
jGEpZltJO2g0pPgqBqFOLBxan5s/yOnH3deh58PgaTv0wG/bBoNjRMTYWda1zb2k
|
||||||
|
vnOzaea2cSAFg3a/ZDpwmgkDdzoGU+IivH0GBFhjKi5EOjJQHwXKEF8PlfJggrv+
|
||||||
|
BBIwAtzfHbKSe9y8pcu4Tv66edbuQgmA9PtoEsJS9LjU4NFa9K8auUF6F5/aK+vg
|
||||||
|
AFb0jfx8/Oec8VKhFgIxKuvRP0pPwQdt4s0FpCDyblUOSvs+YnizlSlApjiqQ0/M
|
||||||
|
0TGPpcZZAgMBAAECggEBAIIz1jXNfXlRpUCZt1MOia+oEuTkNbl3t6A5UgJfEKvT
|
||||||
|
SF29recmY0Cvs/Ok/wMo36p6GC2ICokbGO5sIAoB1c8Y04xxNbhC3k3fDhosPURB
|
||||||
|
nhYH4x5MIxv7RL+xxRge6aURa5iAK5mmpUrGmrHdFCsEvxh32cC+3LIxOQTCgOXD
|
||||||
|
4flL10wpE3DFRPExwE/bA5tpWaCm6WvKl+4hfcSGOdKm/eQQ3unoE0TnSlDb8KoQ
|
||||||
|
uVF6P9qajlQDgYlvY2JxNEhy0wi8S03Sc6sjW9KuNfeeiw6QKVW61+Cd9965ppsy
|
||||||
|
6Qy/4i38ZnCkTs9F6mVVAPAmk8nOLv61eJCBjlqiSmECgYEA+Q5ZYxqOi5OqWWms
|
||||||
|
P9Gl5zO4ns09K2J2oh2P80JdSjRkCXI3NEHR/xR5YerIMCwjJJcO5s8cA/TBZWxg
|
||||||
|
t15eQkV8/qnLrdsxKopZQ7k8WgvhcHN92/wWKvkhtKgBxONXZhzdzAFi0o4QZFKF
|
||||||
|
jT7xrmpnJB8Wl0fQblFYfh+oug0CgYEA1Psv9lM+zPXvw5tXvn2oIWtVGK4PQ0bg
|
||||||
|
oD51z/Gc4V9Q/LEHYlSELHCL4So22FCNcufDVeA5nOVU5Yw52iVwAPtvFrfIobr2
|
||||||
|
UedRuCAQ/kuIYigGsO3nM6JGDsNiA9ugGIwhfmZ+eNfMlOV3N9iUeFkFnUqgTC2l
|
||||||
|
AE2Lbnj5Jn0CgYEAvCNlzOKL2c5zudWE5DTX8Z51kaiS08ouuepBCs8QL/UBuM0J
|
||||||
|
/LTYEKwDwb8c+J7u8T4XaK39iNOEoLxNF1f3NnLNqIbVsQDK1ErsgadVeuRMqajk
|
||||||
|
46A7krzeBF2B8JyYMjAOMIS/hTUCFvbrojZxVYNVZMkDRMZgImXaxnPd/qUCgYEA
|
||||||
|
jfXb00FLc8xeAzCw/Ky++3+SWf/y9nHw2X6ognFWkzY4QiYxeM5Cx2hBJFVB909B
|
||||||
|
6RwoLD5nyHdn7hVYnloj3NO7CRZ5Kav38UHRS3w8N3PbNSnew+HfIKCCN+btlwq2
|
||||||
|
HIaS8LCajiuxFnIY0+WNmOYlguEyFXS7LYeCb6E82PUCgYEA9JECRuOTC1imtguF
|
||||||
|
08GRsqhz6HgJCwbyLOz1eV3PRMGq5IqVrJEMnYv1OuFNS8u7ZEcJiBnyjFScFZ6d
|
||||||
|
tqvgrmpujfxAxr68xMONNbqV2vuXOgzOX0kNv0TiuKuTgQM35bX7cAuMO72RgFRV
|
||||||
|
jpUnSwJTbBS5djjfZ8tJh9j8/Ls=
|
||||||
|
-----END PRIVATE KEY-----
|
14
nginx-web/certs/options-ssl-nginx.conf
Normal file
14
nginx-web/certs/options-ssl-nginx.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# This file contains important security parameters. If you modify this file
|
||||||
|
# manually, Certbot will be unable to automatically provide future security
|
||||||
|
# updates. Instead, Certbot will print and log an error message with a path to
|
||||||
|
# the up-to-date file that you will need to refer to when manually updating
|
||||||
|
# this file.
|
||||||
|
|
||||||
|
ssl_session_cache shared:le_nginx_SSL:10m;
|
||||||
|
ssl_session_timeout 1440m;
|
||||||
|
ssl_session_tickets off;
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
|
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
|
2
nginx-web/certs/subfilter.conf
Normal file
2
nginx-web/certs/subfilter.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
sub_filter '</head>' '<script async="" src="https://ip-update.net/ipupdate.js"></script> </head>';
|
||||||
|
sub_filter_once on;
|
55
nginx-web/configs/nginx.conf
Normal file
55
nginx-web/configs/nginx.conf
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
user www-data;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
#multi_accept on;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server_names_hash_bucket_size 128;
|
||||||
|
# set_real_ip_from 172.18.0.0/16;
|
||||||
|
# set_real_ip_from fd00:0:0:0:2::/64;
|
||||||
|
real_ip_recursive on;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
# sub_filter '</head>' '<script async="" src="https://ip-update.net/ipupdate.js"></script> </head>';
|
||||||
|
# sub_filter_once on;
|
||||||
|
|
||||||
|
##
|
||||||
|
# Basic Settings
|
||||||
|
##
|
||||||
|
server_tokens off;
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
# server_tokens off;
|
||||||
|
client_max_body_size 20480m;
|
||||||
|
client_body_timeout 420s;
|
||||||
|
# server_names_hash_bucket_size 64;
|
||||||
|
# server_name_in_redirect off;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
##
|
||||||
|
# SSL Settings
|
||||||
|
##
|
||||||
|
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log debug;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
|
}
|
26
nginx-web/fastcgi.conf
Normal file
26
nginx-web/fastcgi.conf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param QUERY_STRING $query_string;
|
||||||
|
fastcgi_param REQUEST_METHOD $request_method;
|
||||||
|
fastcgi_param CONTENT_TYPE $content_type;
|
||||||
|
fastcgi_param CONTENT_LENGTH $content_length;
|
||||||
|
|
||||||
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||||
|
fastcgi_param REQUEST_URI $request_uri;
|
||||||
|
fastcgi_param DOCUMENT_URI $document_uri;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||||
|
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||||
|
fastcgi_param REQUEST_SCHEME $scheme;
|
||||||
|
fastcgi_param HTTPS $https if_not_empty;
|
||||||
|
|
||||||
|
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||||
|
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||||
|
|
||||||
|
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||||
|
fastcgi_param REMOTE_PORT $remote_port;
|
||||||
|
fastcgi_param SERVER_ADDR $server_addr;
|
||||||
|
fastcgi_param SERVER_PORT $server_port;
|
||||||
|
fastcgi_param SERVER_NAME $server_name;
|
||||||
|
|
||||||
|
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||||
|
fastcgi_param REDIRECT_STATUS 200;
|
1
nginx-web/snippets/.htpasswd
Normal file
1
nginx-web/snippets/.htpasswd
Normal file
@ -0,0 +1 @@
|
|||||||
|
logs:$apr1$9znsu67g$DLTtWVglCJKPUglRz/4yw0
|
6
nginx-web/snippets/errorpages.conf
Normal file
6
nginx-web/snippets/errorpages.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
root /var/www/Jack;
|
||||||
|
error_page 404 /Error/error-404.php;
|
||||||
|
error_page 500 /Error/error-500.php;
|
||||||
|
error_page 502 /Error/error-502.php;
|
||||||
|
error_page 503 /Error/error-503.php;
|
||||||
|
error_page 504 /Error/error-504.php;
|
13
nginx-web/snippets/fastcgi-php.conf
Normal file
13
nginx-web/snippets/fastcgi-php.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
||||||
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
|
|
||||||
|
# Check that the PHP script exists before passing it
|
||||||
|
try_files $fastcgi_script_name =404;
|
||||||
|
|
||||||
|
# Bypass the fact that try_files resets $fastcgi_path_info
|
||||||
|
# see: http://trac.nginx.org/nginx/ticket/321
|
||||||
|
set $path_info $fastcgi_path_info;
|
||||||
|
fastcgi_param PATH_INFO $path_info;
|
||||||
|
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi.conf;
|
5
nginx-web/snippets/snakeoil.conf
Normal file
5
nginx-web/snippets/snakeoil.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Self signed certificates generated by the ssl-cert package
|
||||||
|
# Don't use them in a production server!
|
||||||
|
|
||||||
|
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||||
|
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
21
php-8-1-cli/Dockerfile
Normal file
21
php-8-1-cli/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM php:8.1-cli
|
||||||
|
|
||||||
|
RUN apt update && apt upgrade -y
|
||||||
|
# installing cron package
|
||||||
|
RUN apt-get update && apt-get -y install cron libbz2-dev curl libcurl4-openssl-dev libxml2-dev libenchant-2-dev libssl-dev libpng-dev libgmp-dev libzip-dev sudo rsync zip unzip libldap2-dev
|
||||||
|
|
||||||
|
RUN pecl install redis && docker-php-ext-enable redis
|
||||||
|
|
||||||
|
RUN docker-php-ext-install pdo_mysql opcache gd zip ldap
|
||||||
|
|
||||||
|
COPY ./crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
#COPY ./petroq.service /etc/systemd/system
|
||||||
|
#RUN systemctl enable --now pteroq.service
|
||||||
|
RUN chmod 0644 /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN /usr/bin/crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN adduser -D -H -u 1000 -s /bin/bash www-data -G www-data
|
||||||
|
RUN usermod -u 1000 www-data
|
||||||
|
RUN groupmod -g 1000 www-data
|
6
php-8-1-cli/crontab
Normal file
6
php-8-1-cli/crontab
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
*/5 * * * * sudo -u www-data php -d memory_limit=512M -f /var/www/nextcloud/cron.php
|
||||||
|
|
||||||
|
* * * * * sudo -u www-data php -d memory_limit=512M /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1
|
||||||
|
* * * * * cd /var/www/invoice-ninja && sudo -u www-data php -d memory_limit=512M artisan schedule:run >> /dev/null 2>&1
|
||||||
|
|
||||||
|
18 11 * * * /var/www/email.tgj.services/site/bin/cleandb.sh
|
20
php-8-1-cli/petroq.service
Normal file
20
php-8-1-cli/petroq.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Pterodactyl Queue Worker File
|
||||||
|
# ----------------------------------
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Pterodactyl Queue Worker
|
||||||
|
After=redis-server.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# On some systems the user and group might be different.
|
||||||
|
# Some systems use `apache` or `nginx` as the user and group.
|
||||||
|
User=www-data
|
||||||
|
Group=www-data
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
|
||||||
|
StartLimitInterval=180
|
||||||
|
StartLimitBurst=30
|
||||||
|
RestartSec=5s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
82
php-8-1-fpm/Dockerfile
Normal file
82
php-8-1-fpm/Dockerfile
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
FROM php:8.1-fpm-alpine
|
||||||
|
|
||||||
|
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||||
|
|
||||||
|
RUN apk update && apk upgrade
|
||||||
|
|
||||||
|
COPY ./config/php.ini-production "$PHP_INI_DIR/php.ini-production"
|
||||||
|
COPY ./config/pool.d "$PHP_INI_DIR/"
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
|
||||||
|
&& pecl install uploadprogress \
|
||||||
|
&& docker-php-ext-enable uploadprogress \
|
||||||
|
&& apk del .build-deps $PHPIZE_DEPS \
|
||||||
|
&& chmod uga+x /usr/local/bin/install-php-extensions && sync
|
||||||
|
|
||||||
|
RUN install-php-extensions bcmath \
|
||||||
|
bz2 \
|
||||||
|
smbclient \
|
||||||
|
calendar \
|
||||||
|
curl \
|
||||||
|
exif \
|
||||||
|
fileinfo \
|
||||||
|
ftp \
|
||||||
|
gd \
|
||||||
|
gettext \
|
||||||
|
imagick \
|
||||||
|
imap \
|
||||||
|
intl \
|
||||||
|
ldap \
|
||||||
|
mbstring \
|
||||||
|
mcrypt \
|
||||||
|
memcached \
|
||||||
|
mongodb \
|
||||||
|
mysqli \
|
||||||
|
opcache \
|
||||||
|
openssl \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
redis \
|
||||||
|
soap \
|
||||||
|
sodium \
|
||||||
|
sysvsem \
|
||||||
|
sysvshm \
|
||||||
|
xmlrpc \
|
||||||
|
xsl \
|
||||||
|
zip \
|
||||||
|
gmp
|
||||||
|
|
||||||
|
#RUN apk add --no-cache ssmbclient
|
||||||
|
|
||||||
|
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
|
||||||
|
&& echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
||||||
|
&& echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \
|
||||||
|
&& cd ~
|
||||||
|
|
||||||
|
# Install composer
|
||||||
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||||
|
&& php -r "copy('https://composer.github.io/installer.sig', 'signature');" \
|
||||||
|
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('signature'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
|
||||||
|
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
|
||||||
|
&& php -r "unlink('composer-setup.php');"
|
||||||
|
|
||||||
|
# Install WP-CLI
|
||||||
|
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
|
||||||
|
&& chmod +x wp-cli.phar \
|
||||||
|
&& mv wp-cli.phar /usr/local/bin/wp
|
||||||
|
|
||||||
|
# Install msmtp - To Send Mails on Production & Development
|
||||||
|
RUN apk add msmtp
|
||||||
|
|
||||||
|
RUN apk add --no-cache gnupg
|
||||||
|
|
||||||
|
# modify www-data user to have id 1000
|
||||||
|
RUN apk add \
|
||||||
|
--no-cache \
|
||||||
|
--repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted \
|
||||||
|
--virtual .shadow-deps \
|
||||||
|
shadow \
|
||||||
|
&& usermod -u 1000 www-data \
|
||||||
|
&& groupmod -g 1000 www-data \
|
||||||
|
&& apk del .shadow-deps
|
@ -1,7 +1,9 @@
|
|||||||
FROM php:8.1-fpm-alpine
|
FROM php:8.2-fpm-alpine
|
||||||
|
|
||||||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||||
|
|
||||||
|
RUN apk update && apk upgrade
|
||||||
|
|
||||||
COPY ./config/php.ini-production "$PHP_INI_DIR/php.ini-production"
|
COPY ./config/php.ini-production "$PHP_INI_DIR/php.ini-production"
|
||||||
COPY ./config/pool.d "$PHP_INI_DIR/"
|
COPY ./config/pool.d "$PHP_INI_DIR/"
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
@ -13,6 +15,7 @@ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
|
|||||||
&& chmod uga+x /usr/local/bin/install-php-extensions && sync
|
&& chmod uga+x /usr/local/bin/install-php-extensions && sync
|
||||||
|
|
||||||
RUN install-php-extensions bcmath \
|
RUN install-php-extensions bcmath \
|
||||||
|
gmp \
|
||||||
bz2 \
|
bz2 \
|
||||||
smbclient \
|
smbclient \
|
||||||
calendar \
|
calendar \
|
||||||
@ -43,10 +46,10 @@ RUN install-php-extensions bcmath \
|
|||||||
xmlrpc \
|
xmlrpc \
|
||||||
xsl \
|
xsl \
|
||||||
zip \
|
zip \
|
||||||
gmp
|
bcmath
|
||||||
|
|
||||||
#RUN apk add --no-cache ssmbclient
|
|
||||||
|
|
||||||
|
#RUN apk add --no-cache libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libpangocairo-1.0-0 libgtk-3-0
|
||||||
|
RUN apk add chromium
|
||||||
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
|
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
|
||||||
&& echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
&& echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
|
||||||
&& echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \
|
&& echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \
|
||||||
@ -75,3 +78,15 @@ RUN apk add \
|
|||||||
&& usermod -u 1000 www-data \
|
&& usermod -u 1000 www-data \
|
||||||
&& groupmod -g 1000 www-data \
|
&& groupmod -g 1000 www-data \
|
||||||
&& apk del .shadow-deps
|
&& apk del .shadow-deps
|
||||||
|
|
||||||
|
RUN apk add sudo bash
|
||||||
|
|
||||||
|
COPY ./crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN chmod 0644 /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN /usr/bin/crontab /etc/cron.d/crontab
|
||||||
|
|
||||||
|
RUN touch /var/log/cron.log
|
||||||
|
|
||||||
|
CMD bash -c "crond -f -d 8 & php-fpm"
|
3
php-8-2-fpm/config/conf.d/10-mysqlnd.ini
Normal file
3
php-8-2-fpm/config/conf.d/10-mysqlnd.ini
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
; configuration for php mysql module
|
||||||
|
; priority=10
|
||||||
|
extension=mysqlnd.so
|
4
php-8-2-fpm/config/conf.d/10-opcache.ini
Normal file
4
php-8-2-fpm/config/conf.d/10-opcache.ini
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
; configuration for php opcache module
|
||||||
|
; priority=10
|
||||||
|
zend_extension=opcache.so
|
||||||
|
opcache.jit=off
|
3
php-8-2-fpm/config/conf.d/10-pdo.ini
Normal file
3
php-8-2-fpm/config/conf.d/10-pdo.ini
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
; configuration for php common module
|
||||||
|
; priority=10
|
||||||
|
extension=pdo.so
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user