Skip to content

Commit

Permalink
Revisión PL y update para 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jortilles committed Aug 10, 2023
1 parent 259fd4e commit fdb6d61
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from node:12.22.0-buster
from node:18-bullseye

# instalar
ENV DEBIAN_FRONTEND noninteractive

# Install mongodb
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget git curl apt-transport-https ca-certificates apt-utils gnupg build-essential apache2 libaio1
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -
RUN echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list
RUN curl -fsSL https://pgp.mongodb.com/server-6.0.asc | gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
RUN apt-get update
RUN apt-get install -y mongodb-org=4.2.1 mongodb-org-server=4.2.1 mongodb-org-shell=4.2.1 mongodb-org-mongos=4.2.1 mongodb-org-tools=4.2.1
RUN apt-get install -y mongodb-org

#Dependencias de chronium para el envio por correo
RUN apt-get install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
Expand All @@ -31,4 +31,4 @@ COPY /eda /eda
RUN chmod u+x /eda/docker_run.sh

# entrypoint
ENTRYPOINT /eda/docker_run.sh
ENTRYPOINT /eda/docker_run.sh
22 changes: 11 additions & 11 deletions eda/docker_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ fi

if ! $eda_installed
then
mongo --eval 'db.createCollection("users")' EDA
mongo --eval 'db.createCollection("groups")' EDA
mongo --eval 'db.createCollection("dashboard")' EDA
mongo --eval 'db.createCollection("data-source")' EDA
mongo --eval 'db.createCollection("files")' EDA
mongo --eval 'db.createCollection("features")' EDA
mongo --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111110"), "role": "EDA_ADMIN_ROLE", "name" : "ADMIN", "users":[ ObjectId("135792467811111111111111") ] } )' EDA
mongo --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111113"), "role": "EDA_USER_ROLE", "name" : "RO", "users":[] } )' EDA
mongo --eval 'db.users.insert( { "_id" : ObjectId("135792467811111111111111"), "role" : [ ObjectId("135792467811111111111110") ], "name" : "EDA", "email" : "[email protected]", "password" : "$2a$10$J48xu5KAqobLzvD8FX1LOem7NZUMuXPHID1uSHzbzTbM.wGFPXjb2" } )' EDA
mongo --eval ' db.users.insert( { "_id" : ObjectId("135792467811111111111112"), "role" : [], "name" : "edaanonim", "email" : "[email protected]", "password" : "$2a$10$ziukAcgjgTe2XPmjO1xsruKJW1HlX0I2pvCiKZHQ69DdaCzgZA4/2" } ) ' EDA
mongosh --eval 'db.createCollection("users")' EDA
mongosh --eval 'db.createCollection("groups")' EDA
mongosh --eval 'db.createCollection("dashboard")' EDA
mongosh --eval 'db.createCollection("data-source")' EDA
mongosh --eval 'db.createCollection("files")' EDA
mongosh --eval 'db.createCollection("features")' EDA
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111110"), "role": "EDA_ADMIN_ROLE", "name" : "ADMIN", "users":[ ObjectId("135792467811111111111111") ] } )' EDA
mongosh --eval 'db.groups.insert( { "_id": ObjectId("135792467811111111111113"), "role": "EDA_USER_ROLE", "name" : "RO", "users":[] } )' EDA
mongosh --eval 'db.users.insert( { "_id" : ObjectId("135792467811111111111111"), "role" : [ ObjectId("135792467811111111111110") ], "name" : "EDA", "email" : "[email protected]", "password" : "$2a$10$J48xu5KAqobLzvD8FX1LOem7NZUMuXPHID1uSHzbzTbM.wGFPXjb2" } )' EDA
mongosh --eval ' db.users.insert( { "_id" : ObjectId("135792467811111111111112"), "role" : [], "name" : "edaanonim", "email" : "[email protected]", "password" : "$2a$10$ziukAcgjgTe2XPmjO1xsruKJW1HlX0I2pvCiKZHQ69DdaCzgZA4/2" } ) ' EDA

npm install -g forever forever-monitor nodemon http-server

Expand All @@ -47,7 +47,7 @@ then


cd /eda/eda_app/
npm install
npm install --legacy-peer-deps
npm run build:prod
rm -rf /var/www/html
cp -r /eda/eda_app/dist/app-eda /var/www/html
Expand Down
2 changes: 1 addition & 1 deletion eda/eda_app/src/app/core/pages/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class LoginComponent implements OnInit {
if( baseUrl.substring(-4) == '/es/' ||
baseUrl.substring(-4) == '/ca/' ||
baseUrl.substring(-4) == '/en/' ){
baseUrl = baseUrl.substring(0, baseUrl.length -3)
baseUrl = baseUrl.substring(0, baseUrl.length -5)
}
switch(lan){
case 'EN' : window.location.href = baseUrl + 'en/#/'; break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ export class SidebarComponent implements OnInit {

public redirectLocale(lan: string) {
let baseUrl = window.location.href.split('#')[0];
if (baseUrl.substr(-4) == '/es/' ||
baseUrl.substr(-4) == '/ca/' ||
baseUrl.substr(-4) == '/en/') {
baseUrl = baseUrl.substr(0, baseUrl.length - 3)
if (baseUrl.substring(-4) == '/es/' ||
baseUrl.substring(-4) == '/ca/' ||
baseUrl.substring(-4) == '/en/') {
baseUrl = baseUrl.substring(0, baseUrl.length - 5)
}
switch (lan) {
case 'EN': window.location.href = baseUrl + 'en/#/home'; break;
Expand Down
2 changes: 2 additions & 0 deletions eda/eda_app/src/index_locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
window.location.href = window.location.href.replace('/index.html','')+'/es';
}else if(userLang === 'ca-ES'){
window.location.href = window.location.href.replace('/index.html','')+'/ca';
}else if(userLang.indexOf('pl') >=0){
window.location.href = window.location.href.replace('/index.html','')+'/pl';
}else{
window.location.href = window.location.href.replace('/index.html','')+'/en';
}
Expand Down

0 comments on commit fdb6d61

Please sign in to comment.