mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-26 12:21:00 +03:00
added Dockerfile + config for Vue
This commit is contained in:
parent
e36555f26e
commit
680bc2ae49
5 changed files with 29 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,3 +23,4 @@ yarn-error.log*
|
||||||
|
|
||||||
#config files
|
#config files
|
||||||
server/config/config.json
|
server/config/config.json
|
||||||
|
src/config/config.json
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
FROM node:10-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json /app
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY server /app
|
||||||
|
|
||||||
|
COPY dist /app
|
||||||
|
|
||||||
|
EXPOSE 3009
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
|
@ -3,5 +3,6 @@
|
||||||
"qbit_pass": "adminadmin",
|
"qbit_pass": "adminadmin",
|
||||||
"qbit_host": "https://qbit.mydomain.com",
|
"qbit_host": "https://qbit.mydomain.com",
|
||||||
"web_user": "username",
|
"web_user": "username",
|
||||||
"web_pass": " password"
|
"web_pass": " password",
|
||||||
|
"web_host": "https://vuetr.mydomain.me"
|
||||||
}
|
}
|
||||||
|
|
8
src/config/config.example.json
Normal file
8
src/config/config.example.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"qbit_user": "admin",
|
||||||
|
"qbit_pass": "adminadmin",
|
||||||
|
"qbit_host": "https://qbit.mydomain.com",
|
||||||
|
"web_user": "username",
|
||||||
|
"web_pass": " password",
|
||||||
|
"web_host": "https://vuetr.mydomain.me"
|
||||||
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
import {timingSafeEqual} from 'crypto';
|
|
||||||
|
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
|
|
||||||
|
const info = require('./config/config.json');
|
||||||
|
|
||||||
class Qbit {
|
class Qbit {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._axios = axios.create({
|
this._axios = axios.create({
|
||||||
baseURL: 'http://localhost:3009',
|
baseURL: info.web_host,
|
||||||
timeout: 1000
|
timeout: 1000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue