more
This commit is contained in:
parent
8e96eafc0d
commit
7d787da8e7
4 changed files with 12 additions and 18 deletions
7
Makefile
7
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) .
|
||||
|
|
|
@ -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" ]
|
|
@ -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
|
||||
tail -f /dev/null
|
|
@ -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;
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue