diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6979d37 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:latest + +LABEL authors="Endera" + +EXPOSE 8081 + +COPY prepare.sh /root/prepare.sh + +ENTRYPOINT ["bash", "/root/prepare.sh"] \ No newline at end of file diff --git a/prepare.sh b/prepare.sh new file mode 100644 index 0000000..eb7eb1b --- /dev/null +++ b/prepare.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +cd ~ + +bash -c "cat << EOF > /etc/apt/sources.list && apt update +deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse +EOF" + +apt install sudo git wget openjdk-17-jdk -y + +git config --global user.name "EnderByEndera" +git config --global user.password "8Bs8hxHtE-iq44g" + +git clone https://git.mesalab.cn/EnderByEndera/realtime_protection.git + +cd realtime_protection +./gradlew clean && ./gradlew bootJar \ No newline at end of file diff --git a/src/main/resources/nginx/nginx.conf b/src/main/resources/nginx/nginx.conf new file mode 100644 index 0000000..41e2748 --- /dev/null +++ b/src/main/resources/nginx/nginx.conf @@ -0,0 +1,84 @@ +user root root; +worker_processes auto; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + types_hash_max_size 2048; + # server_tokens off; + + # 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 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; + + ## + # Logging Settings + ## + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + ## + # Gzip Settings + ## + + gzip on; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; + include /home/wzw/nginx/configs/*.conf; +} + + +#mail { +# # See sample authentication script at: +# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript +# +# # auth_http localhost/auth.php; +# # pop3_capabilities "TOP" "USER"; +# # imap_capabilities "IMAP4rev1" "UIDPLUS"; +# +# server { +# listen localhost:110; +# protocol pop3; +# proxy on; +# } +# +# server { +# listen localhost:143; +# protocol imap; +# proxy on; +# } +#} diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico new file mode 100644 index 0000000..478c817 Binary files /dev/null and b/src/main/resources/static/favicon.ico differ diff --git a/src/main/resources/static/test.html b/src/main/resources/static/test.html new file mode 100644 index 0000000..fe894c4 --- /dev/null +++ b/src/main/resources/static/test.html @@ -0,0 +1,47 @@ + +
+ +input your target api address:
+input your token:
+