Skip to content

Commit

Permalink
Replace add with copy and changed cmd in dfile modified default vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nannal committed Mar 31, 2019
1 parent d9ab510 commit c12c846
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM node:latest
RUN apt-get update -y
RUN apt-get install imagemagick libjansson4 -y

ADD . /DtubeSnapProcessor
COPY . /DtubeSnapProcessor
WORKDIR /DtubeSnapProcessor
RUN npm install

Expand All @@ -14,4 +14,4 @@ ENV IPFSIP "127.0.0.1"
ENV IPFSPORT "5001"
ENV IPFSPROTOCOL "http"

CMD ["npm", "start"]
CMD ["node", "snap-processor"]
2 changes: 1 addition & 1 deletion snap-processor-cmds.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const ipfsAPI = require('ipfs-http-client');
const fs = require('fs');


var ipfsIp = process.env.IPFSIP || '10.0.106.86';
var ipfsIp = process.env.IPFSIP || '127.0.0.1';
var ipfsPort = process.env.IPFSPORT || '5001';
var ipfsProtocol = process.env.IPFSPROTOCOL || 'http';

Expand Down
8 changes: 4 additions & 4 deletions snap-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const readChunk = require('read-chunk');
const fileType = require('file-type');
var cmds = require('./snap-processor-cmds.js');


corsVar = process.env.CORSVAR || 'https://dtube.nannal.com';

// variable to assure only one upload request happens
var reqhappened = false;
Expand All @@ -22,11 +22,11 @@ http.createServer(function (req, res) {
res.setHeader('Access-Control-Allow-Headers', 'Origin, Authorization, Accept');
res.setHeader('Access-Control-Allow-Headers', 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range');
res.setHeader('Access-Control-Allow-Methods','GET, POST, OPTIONS');
res.setHeader('Access-Control-Allow-Origin', 'https://d.tube');
res.setHeader('access-control-allow-origin', corsVar);
res.setHeader('Access-Control-Max-Age', '1728000');
res.setHeader('Connection', 'keep-alive');
res.setHeader('Content-Type', 'application/json; charset=utf-8');
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
// res.setHeader('Content-Type', 'application/json; charset=utf-8');
// res.setHeader('Content-Type', 'text/plain; charset=utf-8');

if (req.url == '/getStatus') {
res.statusCode = 200;
Expand Down

0 comments on commit c12c846

Please sign in to comment.