Showing
3 changed files
with
61 additions
and
2 deletions
README.md
0 → 100644
1 | + | |
2 | +# Servidor | |
3 | + | |
4 | +Modificar el Dockerfile con credenciales y otros datos. | |
5 | + | |
6 | +``` | |
7 | + RUN echo "NODE_TLS_REJECT_UNAUTHORIZED=0\n"\ | |
8 | + "COUCHDB_URL=http://couch_server:5984\n"\ | |
9 | + "DB_VALORACIONES=valoraciones\n"\ | |
10 | + "DB_UBICACIONES=ubicaciones\n"\ | |
11 | + "DB_REPORTES=reporte\n"\ | |
12 | + "DB_NONCES=nonces\n"\ | |
13 | + "DB_TOKENS=tokens\n"\ | |
14 | + "TOKEN_INTERVAL=840000\n"\ | |
15 | + "AUTH_TOKEN=0496164f-8de1-449c-9ce9-af0e0a6ce9fe\n"\ | |
16 | + "CLIENT_SECRET=a66a1a98eb7059a5c3b446183e214cc2661326c2994b811cb06dd9d3d873a9e9\n"\ | |
17 | + "SENATICS_URL=https://devaip.senatics.gov.py:443/portal-core/rest/api\n" > .env | |
18 | +``` | |
19 | + | |
20 | +### NODE_TLS_REJECT_UNAUTHORIZED | |
21 | + * 0 -> Portal desarrollo | |
22 | + * eliminar linea -> Portal de produccion | |
23 | + | |
24 | +### COUCHDB_URL | |
25 | + http://couch_server:5984 -> modificar en caso de cambiar el `runserver.sh` | |
26 | + | |
27 | +### TOKEN_INTERVAL | |
28 | +* 840000 -> 13 minutos en millisegundos | |
29 | + | |
30 | +### AUTH_TOKEN | |
31 | + Token de autenticación del portal | |
32 | +### CLIENT_SECRET | |
33 | + Secreto para la autenticación con el portal | |
34 | + | |
35 | +### SENATICS_URL | |
36 | + * Desarrollo: https://devaip.senatics.gov.py:443/portal-core/rest/api | |
37 | + * Produccion: https://informacionpublica.paraguay.gov.py:443/portal-core/rest/api | |
38 | + | |
39 | +### Nombres de las bases de datos | |
40 | +* DB_VALORACIONES=valoraciones | |
41 | +* DB_UBICACIONES=ubicaciones | |
42 | +* DB_REPORTES=reporte | |
43 | +* DB_NONCES=nonces | |
44 | +* DB_TOKENS=tokens | ... | ... |
... | ... | @@ -4,8 +4,18 @@ WORKDIR /usr/src/app/server |
4 | 4 | COPY package*.json ./ |
5 | 5 | RUN npm install |
6 | 6 | |
7 | -RUN echo "NODE_ENV=production\n" > .env | |
8 | - | |
9 | 7 | COPY . . |
10 | 8 | |
9 | +RUN echo "NODE_TLS_REJECT_UNAUTHORIZED=0\n"\ | |
10 | +"COUCHDB_URL=http://couch_server:5984\n"\ | |
11 | +"DB_VALORACIONES=valoraciones\n"\ | |
12 | +"DB_UBICACIONES=ubicaciones\n"\ | |
13 | +"DB_REPORTES=reporte\n"\ | |
14 | +"DB_NONCES=nonces\n"\ | |
15 | +"DB_TOKENS=tokens\n"\ | |
16 | +"TOKEN_INTERVAL=840000\n"\ | |
17 | +"AUTH_TOKEN=0496164f-8de1-449c-9ce9-af0e0a6ce9fe\n"\ | |
18 | +"CLIENT_SECRET=a66a1a98eb7059a5c3b446183e214cc2661326c2994b811cb06dd9d3d873a9e9\n"\ | |
19 | +"SENATICS_URL=https://devaip.senatics.gov.py:443/portal-core/rest/api\n" > .env | |
20 | + | |
11 | 21 | CMD ["npm", "start"] | ... | ... |
runsever.sh
0 → 100644
1 | +docker build -t jaikuaamina/server jaikuaamina-server | |
2 | +docker network create jaikuaamina | |
3 | +docker volume create jaikuaamina-data | |
4 | +docker run -d --rm --network jaikuaamina -p 5984:5984 --name couch_server -v jaikuaamina-data:/opt/couchdb/data couchdb | |
5 | +docker run -d --rm --network jaikuaamina -p 15000:3000 --name jaikuaamina jaikuaamina/server | ... | ... |
Please
register
or
login
to post a comment