Skip to content

Commit fe0cdc1

Browse files
authored
Merge pull request #26 from OSWeekends/develop
Clean up & Sync
2 parents e0395f9 + 614da90 commit fe0cdc1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4558
-261
lines changed

.dockerignore

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Sensitive
2+
temp
3+
secrets
4+
5+
# Created by https://www.gitignore.io/api/node,macos,linux,windows
6+
7+
### Linux ###
8+
*~
9+
10+
# temporary files which can be created if a process still has a handle open of a deleted file
11+
.fuse_hidden*
12+
13+
# KDE directory preferences
14+
.directory
15+
16+
# Linux trash folder which might appear on any partition or disk
17+
.Trash-*
18+
19+
# .nfs files are created when an open file is removed but is still being accessed
20+
.nfs*
21+
22+
### macOS ###
23+
*.DS_Store
24+
.AppleDouble
25+
.LSOverride
26+
27+
# Icon must end with two \r
28+
Icon
29+
30+
# Thumbnails
31+
._*
32+
33+
# Files that might appear in the root of a volume
34+
.DocumentRevisions-V100
35+
.fseventsd
36+
.Spotlight-V100
37+
.TemporaryItems
38+
.Trashes
39+
.VolumeIcon.icns
40+
.com.apple.timemachine.donotpresent
41+
42+
# Directories potentially created on remote AFP share
43+
.AppleDB
44+
.AppleDesktop
45+
Network Trash Folder
46+
Temporary Items
47+
.apdisk
48+
49+
### Node ###
50+
# Logs
51+
logs
52+
*.log
53+
npm-debug.log*
54+
yarn-debug.log*
55+
yarn-error.log*
56+
57+
# Runtime data
58+
pids
59+
*.pid
60+
*.seed
61+
*.pid.lock
62+
63+
# Directory for instrumented libs generated by jscoverage/JSCover
64+
lib-cov
65+
66+
# Coverage directory used by tools like istanbul
67+
coverage
68+
69+
# nyc test coverage
70+
.nyc_output
71+
72+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
73+
.grunt
74+
75+
# Bower dependency directory (https://bower.io/)
76+
bower_components
77+
78+
# node-waf configuration
79+
.lock-wscript
80+
81+
# Compiled binary addons (http://nodejs.org/api/addons.html)
82+
build/Release
83+
84+
# Dependency directories
85+
node_modules/
86+
jspm_packages/
87+
88+
# Typescript v1 declaration files
89+
typings/
90+
91+
# Optional npm cache directory
92+
.npm
93+
94+
# Optional eslint cache
95+
.eslintcache
96+
97+
# Optional REPL history
98+
.node_repl_history
99+
100+
# Output of 'npm pack'
101+
*.tgz
102+
103+
# Yarn Integrity file
104+
.yarn-integrity
105+
106+
# dotenv environment variables file
107+
.env
108+
109+
110+
### Windows ###
111+
# Windows thumbnail cache files
112+
Thumbs.db
113+
ehthumbs.db
114+
ehthumbs_vista.db
115+
116+
# Folder config file
117+
Desktop.ini
118+
119+
# Recycle Bin used on file shares
120+
$RECYCLE.BIN/
121+
122+
# Windows Installer files
123+
*.cab
124+
*.msi
125+
*.msm
126+
*.msp
127+
128+
# Windows shortcuts
129+
*.lnk
130+
131+
132+
# End of https://www.gitignore.io/api/node,macos,linux,windows

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Sensitive
22
SECRET_gcloud.json
33
config.js
4+
temp
45

56

67
# Created by https://www.gitignore.io/api/node,macos,linux,windows
@@ -130,4 +131,10 @@ $RECYCLE.BIN/
130131
*.lnk
131132

132133

133-
# End of https://www.gitignore.io/api/node,macos,linux,windows
134+
# End of https://www.gitignore.io/api/node,macos,linux,windows
135+
136+
# Elena's stuff
137+
package.json
138+
server.js
139+
experiments.pug
140+
other

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,26 @@ Solo necesitas tener Node y descargarte [exiftool](https://www.sno.phy.queensu.c
8383

8484
**Lanza el proyecto en local**
8585

86-
`npm install && npm start`
86+
`docker build -t batimagen . `
87+
`docker run -p 3000:3000 batimagen`
88+
89+
**Lanzar el proyecto con todo (thirdparty)**
90+
91+
Guarda el fichero de tokens de Google Cloud en `secrets/SECRET_gcloud.json`
92+
93+
```bash
94+
$ docker run \
95+
-p 3000:3000 \ # Bindeo de puertos
96+
-v "$(pwd)/temp/":/app/temp/ \ # Extraer los analisis del repo
97+
-v "$(pwd)/secrets/":/app/secrets/ \ # Compartición de fichero de credenciales
98+
-e TP_ENABLED=true \ # habilitar terceras partes
99+
-e TP_VIRUSTOTAL=true \ # habilitar virus total
100+
-e TP_GVISION=true \ # habilitar Google Vision
101+
-e VIRUSTOTAL='----YOUR TOKEN ----' # Añadir to token de virus total
102+
-e GOOGLE_APPLICATION_CREDENTIALS='./secrets/SECRET_gcloud.json' # vicular la ruta de los tokens de Google Cloud
103+
batimagen # Imagen de docker
104+
```
105+
87106

88107
### Estado del proyecto.
89108

config.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
var config = {
2-
honeypotMode: true,
2+
thirdPartiesEnabled: process.env.TP_ENABLED || false,
3+
thirdParties: {
4+
virustotal: process.env.TP_VIRUSTOTAL || false,
5+
googleVision: process.env.TP_GVISION || false
6+
},
7+
paths: {
8+
temp: `${__dirname}/temp`
9+
},
310
token: {
4-
virustotal: "----TOKEN---"
11+
virustotal: process.env.VIRUSTOTAL || ""
512
}
6-
}
13+
};
714

815
module.exports = config;

dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu:14.04
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
5+
WORKDIR /app
6+
7+
COPY . .
8+
9+
RUN chmod +x scripts/*.sh && \
10+
./scripts/installation.sh && \
11+
npm install
12+
13+
EXPOSE 8080
14+
CMD [ "npm", "start" ]

file_processing.js

-104
This file was deleted.

honeypot.js

-55
This file was deleted.

0 commit comments

Comments
 (0)