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)
$(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) .
# 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
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
# 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
#!/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
include /etc/nginx/modules-enabled/*.conf;
events {
- worker_connections 768;
- # multi_accept on;
+ worker_connections 1024;
+ multi_accept on;
}
http {
# Logging Settings
##
- access_log /var/log/nginx/access.log;
+ access_log off;
error_log /var/log/nginx/error.log;
##