Skip to content
Snippets Groups Projects
Commit 1670e132 authored by Alexandre Vanini's avatar Alexandre Vanini
Browse files

Merge branch 'dev'

parents 5d173c4e 619e299d
Branches
No related tags found
No related merge requests found
...@@ -63,11 +63,12 @@ db.createUser( ...@@ -63,11 +63,12 @@ db.createUser(
``` ```
##### (optional) Importing data ##### (optional) Importing data
<p>If you want to popularize the database with programs and katas, you can insert the following file in the mongo db database</p> <p>If you want to popularize the database with programs,katas and subscription, you can insert the following files in the mongo db database</p>
>./mongodb/data/programs >./mongodb/data/programs
>./mongodb/data/programssubscription
<p>to import the datas, copy past them and to the following steps :</p> <p>to import the datas, copy them and to the following steps :</p>
>./mongodb/ >./mongodb/
``` ```
...@@ -77,6 +78,7 @@ password : example ...@@ -77,6 +78,7 @@ password : example
``` ```
use DojoHepia use DojoHepia
db.Programs.insertMany(<programs-copied-data>); db.Programs.insertMany(<programs-copied-data>);
db.ProgramsSubscription.insertMany(<programs-subscription-copied-data>);
``` ```
#### 2. Gateway #### 2. Gateway
......
[{"_id":"c1eed8bf-da7d-4780-948b-3bdf03af47e2","idprogram":"baac03de-2816-470e-8789-3c10b438364f","iduser":"1","katas":[],"nbKataDone":0,"status":true},{"_id":"95fe5168-f463-493d-8357-c05aee8caeb8","idprogram":"26f8bb8a-e872-4b21-94a4-56308d500399","iduser":"2","katas":[],"nbKataDone":0,"status":true},{"_id":"4863a985-ad1f-4de9-8ae9-98f4721d81d9","idprogram":"86a3991a-a02e-4e0a-9323-7f4cedca2e3b","iduser":"2","katas":[{"_id":"24ba470b-5678-482b-a888-95a02b6bf90e","mysol":"import java.util.ArrayList;\n\npublic class Kata {\n public static int sum(ArrayList<Integer> list){\n int sum = 0;\n for(int i = 0;i<list.size();i++)\n sum += list.get(i);\n return sum;\n }\n}\n","nbAttempt":3,"status":"RESOLVED"}],"nbKataDone":1,"status":true},{"_id":"0a8e6a59-835c-4936-857d-4d10a8fea2c9","idprogram":"baac03de-2816-470e-8789-3c10b438364f","iduser":"0","katas":[{"_id":"41ea64c1-0711-46a8-aece-fae593283ad1","mysol":"def add(arr,m):\n arr.append(m)\n return arr","nbAttempt":1,"status":"RESOLVED"}],"nbKataDone":1,"status":true}]
[{"_id":"0a8e6a59-835c-4936-857d-4d10a8fea2c9","idprogram":"baac03de-2816-470e-8789-3c10b438364f","iduser":"0","katas":[{"_id":"41ea64c1-0711-46a8-aece-fae593283ad1","mysol":"def add(arr,m):\n arr.append(m)\n return arr","nbAttempt":1,"status":"RESOLVED"}],"nbKataDone":1,"status":true},{"_id":"95fe5168-f463-493d-8357-c05aee8caeb8","idprogram":"26f8bb8a-e872-4b21-94a4-56308d500399","iduser":"0","katas":[],"nbKataDone":0,"status":true},{"_id":"4863a985-ad1f-4de9-8ae9-98f4721d81d9","idprogram":"86a3991a-a02e-4e0a-9323-7f4cedca2e3b","iduser":"0","katas":[{"_id":"24ba470b-5678-482b-a888-95a02b6bf90e","mysol":"import java.util.ArrayList;\n\npublic class Kata {\n public static int sum(ArrayList<Integer> list){\n int sum = 0;\n for(int i = 0;i<list.size();i++)\n sum += list.get(i);\n return sum;\n }\n}\n","nbAttempt":3,"status":"RESOLVED"}],"nbKataDone":1,"status":true}]
...@@ -10,10 +10,7 @@ services: ...@@ -10,10 +10,7 @@ services:
environment: environment:
MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: DojoHepia
MONGODB_USER: shodai
MONGODB_DATABASE: DojoHepia
MONGODB_PASS: shodai
mongo-express: mongo-express:
image: mongo-express image: mongo-express
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment