chore: Add dockers
This commit is contained in:
parent
f9a729f22c
commit
15091444be
7 changed files with 992 additions and 763 deletions
8
.dockerignore
Normal file
8
.dockerignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.idea
|
||||||
|
node_modules
|
||||||
|
backend/Dockerfile
|
||||||
|
dist
|
||||||
|
.dockerignore
|
||||||
|
test
|
||||||
|
.gitignore
|
||||||
|
.git
|
15
backend/Dockerfile
Normal file
15
backend/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
FROM node:22-bookworm
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
RUN npx playwright install --with-deps
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "dist/app.js", "--", "--port", "3000", "--proxy", "socks5://tor:9050"]
|
1678
package-lock.json → backend/package-lock.json
generated
1678
package-lock.json → backend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "lucida-queue",
|
"name": "lucida-queue",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"description": "Queue for downloading from lucida.to",
|
"description": "Queue for downloading from lucida.to",
|
||||||
"main": "backend/app.ts",
|
"main": "app.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@ -58,7 +58,7 @@
|
||||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
||||||
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
"outDir": "dist", /* Specify an output folder for all emitted files. */
|
||||||
// "removeComments": true, /* Disable emitting comments. */
|
// "removeComments": true, /* Disable emitting comments. */
|
||||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||||
|
@ -109,12 +109,9 @@
|
||||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"backend/**/*.ts",
|
"./**/*.ts",
|
||||||
"backend/**/*.ts",
|
|
||||||
"frontend/**/*.ts",
|
|
||||||
"backend/services/**/*.ts",
|
|
||||||
"backend/types/**/*.ts",
|
|
||||||
"backend/app.ts"
|
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules"]
|
"exclude": [
|
||||||
|
"node_modules"
|
||||||
|
]
|
||||||
}
|
}
|
30
docker-compose.yml
Normal file
30
docker-compose.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: ./frontend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
depends_on:
|
||||||
|
- backend
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: ./backend
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
volumes:
|
||||||
|
- "/srv/lucida-queue:/data"
|
||||||
|
depends_on:
|
||||||
|
- tor
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
tor:
|
||||||
|
container_name: tor
|
||||||
|
image: osminogin/tor-simple
|
||||||
|
ports:
|
||||||
|
- "9050:9050"
|
||||||
|
stop_grace_period: 1m
|
||||||
|
restart: always
|
7
frontend/Dockerfile
Normal file
7
frontend/Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY . /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
Reference in a new issue