Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
dist
dist
encoreDB
conceptGraph/tmp
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,10 @@ dist
.tern-port

certificate.pem

tmp

src/conceptGraph/material/*
!src/conceptGraph/material/README.md

encoreDB
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@ FROM node:17.8

WORKDIR /backend

RUN apt-get update && \
apt-get install sqlite3 curl -y

ADD . .

RUN npm install

# Download materials to generate db
RUN curl https://papygame.com/Encore/concepts_lexicon.csv --output src/conceptGraph/material/concepts_lexicon.csv && \
curl https://papygame.com/Encore/encore_oers.csv --output src/conceptGraph/material/encore_oers.csv && \
curl https://papygame.com/Encore/OER_and_concept_table.csv --output src/conceptGraph/material/OER_and_concept_table.csv && \
curl https://papygame.com/Encore/OER_and_wiki_relationships_hyperlinks_NEW.csv --output src/conceptGraph/material/OER_and_wiki_relationships_hyperlinks_NEW.csv


RUN npm run encore:dbInit

CMD [ "npm", "run", "start" ]
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ services:
build: .
ports:
- 5000:5000
volumes:
- ./:/backend
# volumes:
# - ./:/backend
environment:
- MONGO_URL=mongodb://prova:SECRET@mongodb:27017
- MONGODB_URI=mongodb://prova:SECRET@mongodb:27017
- CORS_ORIGINS=http://localhost:3000
- COOKIE_KEY=any_long_and_random_string
- COOKIE_KEY=any_long_and_random_string
# command: npm run dev
Loading