mirror of
https://github.com/nokonoko/Uguu.git
synced 2024-01-06 13:35:15 +00:00
more
This commit is contained in:
parent
8e96eafc0d
commit
7d787da8e7
7
Makefile
7
Makefile
@ -19,9 +19,6 @@ TMPDIR = $(shell mktemp -d)
|
|||||||
DOCKER_IMAGE = "$(shell basename $(CURDIR) | tr [:upper:] [:lower:])"
|
DOCKER_IMAGE = "$(shell basename $(CURDIR) | tr [:upper:] [:lower:])"
|
||||||
DOCKER_TAG = "$(DOCKER_TAG)"
|
DOCKER_TAG = "$(DOCKER_TAG)"
|
||||||
CONTAINER_NAME = "$(CONTAINER_NAME)"
|
CONTAINER_NAME = "$(CONTAINER_NAME)"
|
||||||
# default modules
|
|
||||||
MODULES="php"
|
|
||||||
|
|
||||||
pageList = $(shell $(CURDIR)/$(NODEJQ) -r ".pages[]" $(CURDIR)/$(CONF))
|
pageList = $(shell $(CURDIR)/$(NODEJQ) -r ".pages[]" $(CURDIR)/$(CONF))
|
||||||
noExt = $(shell echo $(i) | cut -d '.' -f1)
|
noExt = $(shell echo $(i) | cut -d '.' -f1)
|
||||||
|
|
||||||
@ -91,11 +88,13 @@ npm_dependencies:
|
|||||||
$(NPM) install
|
$(NPM) install
|
||||||
|
|
||||||
build-container-no-cache:
|
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/
|
mv uguuForDocker.tar.gz docker/
|
||||||
docker build -f docker/Dockerfile --build-arg VERSION=$(PKG_VERSION) --no-cache -t uguu:$(PKG_VERSION) .
|
docker build -f docker/Dockerfile --build-arg VERSION=$(PKG_VERSION) --no-cache -t uguu:$(PKG_VERSION) .
|
||||||
|
|
||||||
build-container:
|
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 .
|
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/
|
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) .
|
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
|
# Install needed software
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
RUN apt-get install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 curl cron socat
|
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 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
|
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-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
|
php8.1-common php8.1-readline php8.1-bcmath php8.1-common php8.1-xml
|
||||||
|
|
||||||
|
# Set ENV values for configuration
|
||||||
ARG DOMAIN
|
ARG DOMAIN
|
||||||
ENV DOMAIN=$DOMAIN
|
ENV DOMAIN=$DOMAIN
|
||||||
ARG FILE_DOMAIN
|
ARG FILE_DOMAIN
|
||||||
@ -78,14 +77,10 @@ EXPOSE 80
|
|||||||
# Expose port 443 from the container
|
# Expose port 443 from the container
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
#RUN service nginx restart
|
# Install acme.sh
|
||||||
# Change user to www-data
|
|
||||||
#USER www-data
|
|
||||||
|
|
||||||
#RUN cd /var/www/uguu && make && make install
|
|
||||||
|
|
||||||
RUN curl -o acmeinstall.sh https://get.acme.sh
|
RUN curl -o acmeinstall.sh https://get.acme.sh
|
||||||
RUN chmod a+x acmeinstall.sh
|
RUN chmod a+x acmeinstall.sh
|
||||||
RUN ./acmeinstall.sh
|
RUN ./acmeinstall.sh
|
||||||
|
|
||||||
# Load entrypoint
|
# Load entrypoint
|
||||||
ENTRYPOINT [ "bash", "/var/www/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "bash", "/var/www/docker-entrypoint.sh" ]
|
@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /var/www/uguu
|
cd /var/www/uguu || exit
|
||||||
npm install
|
npm install
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
service nginx stop
|
service nginx stop
|
||||||
rm /etc/nginx/sites-enabled/default
|
rm /etc/nginx/sites-enabled/default
|
||||||
/root/.acme.sh/acme.sh --set-default-ca --server letsencrypt
|
/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 nginx start
|
||||||
service php8.1-fpm 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;
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 768;
|
worker_connections 1024;
|
||||||
# multi_accept on;
|
multi_accept on;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
@ -37,7 +37,7 @@ http {
|
|||||||
# Logging Settings
|
# Logging Settings
|
||||||
##
|
##
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
access_log off;
|
||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
##
|
##
|
||||||
|
Loading…
Reference in New Issue
Block a user