]> jfr.im git - uguu.git/commitdiff
more
authorGo Johansson (neku) <redacted>
Sun, 1 Jan 2023 10:42:39 +0000 (11:42 +0100)
committerGo Johansson (neku) <redacted>
Sun, 1 Jan 2023 10:42:39 +0000 (11:42 +0100)
Makefile
docker/Dockerfile
docker/docker-entrypoint.sh
docker/nginx/nginx.conf

index cf69cf8455188ad46c8c18974ad583296b3fbc4b..fb0f536a9214e375550fadfb3abcc94f773b9306 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,6 @@ TMPDIR = $(shell mktemp -d)
 DOCKER_IMAGE = "$(shell basename $(CURDIR) | tr [:upper:] [:lower:])"
 DOCKER_TAG = "$(DOCKER_TAG)"
 CONTAINER_NAME = "$(CONTAINER_NAME)"
-# default modules
-MODULES="php"
-
 pageList = $(shell $(CURDIR)/$(NODEJQ) -r ".pages[]" $(CURDIR)/$(CONF))
 noExt = $(shell echo $(i) | cut -d '.' -f1)
 
@@ -91,11 +88,13 @@ npm_dependencies:
        $(NPM) install
 
 build-container-no-cache:
-               tar --exclude='./uguuForDocker.tar.gz' --exclude='./vendor' --exclude='./node_modules' --exclude='./build' --exclude='./dist' --exclude='./.git' -czf uguuForDocker.tar.gz .
+               rm uguuForDocker.tar.gz
+               tar --exclude='uguuForDocker.tar.gz' --exclude='vendor' --exclude='node_modules' --exclude='build' --exclude='dist' --exclude='.git' -czf uguuForDocker.tar.gz .
                mv uguuForDocker.tar.gz docker/
                docker build -f docker/Dockerfile --build-arg VERSION=$(PKG_VERSION) --no-cache -t uguu:$(PKG_VERSION) .
 
 build-container:
+               rm uguuForDocker.tar.gz
                tar --exclude='uguuForDocker.tar.gz' --exclude='vendor' --exclude='node_modules' --exclude='build' --exclude='dist' --exclude='.git' -czf uguuForDocker.tar.gz .
                mv uguuForDocker.tar.gz docker/
                docker build -f docker/Dockerfile --build-arg DOMAIN=$(SITEDOMAIN) --build-arg FILE_DOMAIN=$(FILESDOMAIN) --build-arg CONTACT_EMAIL=$(FILESDOMAIN) --build-arg MAX_SIZE=$(MAXSIZE) -t uguu:$(PKG_VERSION) .
index 0b4a62b2cc1e2f7c8904cdc95ab588acf80f8620..880e658fa6b0121a4ea3474a82d25e2a67f36080 100644 (file)
@@ -2,7 +2,6 @@ FROM --platform=linux/amd64 debian:bullseye-slim
 
 # Install needed software
 RUN apt-get update
-
 RUN apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 curl cron socat
 RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.list
 RUN curl -fsSL  https://packages.sury.org/php/apt.gpg| gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg
@@ -17,7 +16,7 @@ RUN apt-get install -y build-essential nginx-full php8.1-fpm php8.1 sqlite3 php8
                        php8.1-mcrypt php8.1-mysql php8.1-xdebug php8.1-zip \
                        php8.1-common php8.1-readline php8.1-bcmath php8.1-common php8.1-xml
 
-
+# Set ENV values for configuration
 ARG DOMAIN
 ENV DOMAIN=$DOMAIN
 ARG FILE_DOMAIN
@@ -78,14 +77,10 @@ EXPOSE 80
 # Expose port 443 from the container
 EXPOSE 443
 
-#RUN service nginx restart
-# Change user to www-data
-#USER www-data
-
-#RUN cd /var/www/uguu && make && make install
-
+# Install acme.sh
 RUN curl -o acmeinstall.sh https://get.acme.sh
 RUN chmod a+x acmeinstall.sh
 RUN ./acmeinstall.sh
+
 # Load entrypoint
 ENTRYPOINT [ "bash", "/var/www/docker-entrypoint.sh" ]
\ No newline at end of file
index 9f3a26f5d8323656f1d24b8e7288e912a89f0eb5..cf7d19dcba1bf82a0692d355e82cf7579cafb25d 100644 (file)
@@ -1,12 +1,12 @@
 #!/bin/bash
-cd /var/www/uguu
+cd /var/www/uguu || exit
 npm install
 make
 make install
 service nginx stop
 rm /etc/nginx/sites-enabled/default
 /root/.acme.sh/acme.sh --set-default-ca --server letsencrypt
-/root/.acme.sh/acme.sh --issue --standalone -d $DOMAIN -d $FILE_DOMAIN
+/root/.acme.sh/acme.sh --issue --standalone -d "$DOMAIN" -d "$FILE_DOMAIN"
 service nginx start
 service php8.1-fpm start
-tail -f /var/log/nginx/access.log
\ No newline at end of file
+tail -f /dev/null
\ No newline at end of file
index e9627544ca27e6371e947534acf11ad5a5c1d671..22ca8510ab21a80fecfec13f0974e6673e4c4608 100644 (file)
@@ -4,8 +4,8 @@ pid /run/nginx.pid;
 include /etc/nginx/modules-enabled/*.conf;
 
 events {
-        worker_connections 768;
-        multi_accept on;
+        worker_connections 1024;
+        multi_accept on;
 }
 
 http {
@@ -37,7 +37,7 @@ http {
         # Logging Settings
         ##
 
-        access_log /var/log/nginx/access.log;
+        access_log off;
         error_log /var/log/nginx/error.log;
 
         ##