Upload 5 files
Browse files- .gitignore +1 -0
- Dockerfile +32 -0
- LICENSE +21 -0
- package-lock.json +0 -0
- package.json +28 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
Dockerfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM quay.io/np22-jpg/fedora-npm AS devel
|
| 2 |
+
ARG NPM_BUILD="npm install"
|
| 3 |
+
|
| 4 |
+
RUN mkdir /app
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
COPY package.json package-lock.json ./
|
| 8 |
+
RUN $NPM_BUILD
|
| 9 |
+
COPY . .
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
FROM quay.io/np22-jpg/fedora-node AS release
|
| 13 |
+
|
| 14 |
+
LABEL maintainer="TitaniumNetwork Ultraviolet Team"
|
| 15 |
+
LABEL summary="Ultraviolet Proxy Image"
|
| 16 |
+
LABEL description="Example application of Ultraviolet which can be deployed in production."
|
| 17 |
+
|
| 18 |
+
ENV NODE_ENV=production
|
| 19 |
+
|
| 20 |
+
USER node
|
| 21 |
+
WORKDIR /app
|
| 22 |
+
COPY --from=devel --chown=1000:1000 /app/node_modules node_modules
|
| 23 |
+
COPY --from=devel --chown=1000:1000 /app/src/index.js src/index.js
|
| 24 |
+
COPY --from=devel --chown=1000:1000 /app/package.json package.json
|
| 25 |
+
|
| 26 |
+
EXPOSE 8080/tcp
|
| 27 |
+
|
| 28 |
+
HEALTHCHECK --interval=5s --timeout=3s --start-period=5s \
|
| 29 |
+
CMD /usr/bin/curl -f http://localhost:8080 || false
|
| 30 |
+
|
| 31 |
+
ENTRYPOINT [ "/usr/bin/node" ]
|
| 32 |
+
CMD [ "src/index.js" ]
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2022 Titanium Network
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "uv-app",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "Ultraviolet instance",
|
| 5 |
+
"type": "module",
|
| 6 |
+
"engines": {
|
| 7 |
+
"npm": ">=7.0.0",
|
| 8 |
+
"node": ">=16.0.0"
|
| 9 |
+
},
|
| 10 |
+
"scripts": {
|
| 11 |
+
"start": "node src/index.js"
|
| 12 |
+
},
|
| 13 |
+
"keywords": [
|
| 14 |
+
"proxy"
|
| 15 |
+
],
|
| 16 |
+
"author": "",
|
| 17 |
+
"license": "GPL-3.0-or-later",
|
| 18 |
+
"dependencies": {
|
| 19 |
+
"@titaniumnetwork-dev/ultraviolet": "^2.0.0",
|
| 20 |
+
"@tomphttp/bare-server-node": "^2.0.0",
|
| 21 |
+
"express": "^4.18.2",
|
| 22 |
+
"ultraviolet-static": "github:Edward358-AI/Ultraviolet-Static"
|
| 23 |
+
},
|
| 24 |
+
"devDependencies": {
|
| 25 |
+
"eslint": "^8.36.0",
|
| 26 |
+
"prettier": "^2.8.4"
|
| 27 |
+
}
|
| 28 |
+
}
|