-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Usa sip2.0b11 y sus convenciones, ver https://github.com/pasosdeJesus…
- Loading branch information
Showing
11 changed files
with
215 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CONTRIBUCIONES | ||
|
||
Aplican los mismos lineamientos descritos en: | ||
<https://github.com/pasosdeJesus/sip/blob/master/CONTRIBUTING.md> | ||
|
||
Respecto a la aplicación de prueba, una vez la configure e ingrese | ||
a la aplicación desde un navegador en el punto de montaje `/jn316`, | ||
utilice el usuario administrador `jn316` con clave `jn316`. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,75 @@ | ||
export RAILS_RELATIVE_URL_ROOT=/ | ||
export RAILS_ENV=development # Modo (development o production) | ||
export IPDES=192.168.1.3 # IP en modo de desarrollo con http | ||
export PUERTODES=2300 # Puerto en modo desarrollo con http | ||
#!/bin/sh | ||
# Variables de configuración de la aplicación | ||
# Damos precedencia a las especificadas en línea de ordenes | ||
|
||
|
||
# Base de datos | ||
if (test "$BD_USUARIO" = "") then { | ||
export BD_USUARIO=sipdes | ||
} fi; | ||
if (test "$BD_CLAVE" = "") then { | ||
export BD_CLAVE=xyz | ||
} fi; | ||
if (test "$BD_DES" = "") then { | ||
export BD_DES=jn316gen_des | ||
} fi; | ||
if (test "$BD_PRUEBA" = "") then { | ||
export BD_PRUEBA=jn316gen_pru | ||
} fi; | ||
if (test "$BD_PRO" = "") then { | ||
export BD_PRO=jn316gen_pro | ||
} fi; | ||
|
||
|
||
|
||
# Despliegue común en desarrollo y producción | ||
if (test "$CONFIG_HOSTS" = "") then { | ||
export CONFIG_HOSTS=192.168.10.1 | ||
} fi; | ||
if (test "$RUTA_RELATIVA" = "") then { | ||
export RUTA_RELATIVA=/jn316/ | ||
} fi; | ||
if (test "$DIRAP" = "") then { | ||
export DIRAP="$HOME/comp/rails/jn316_gen/test/dummy" | ||
} fi; | ||
if (test "$RAILS_ENV" = "") then { | ||
export RAILS_ENV=development | ||
} fi; | ||
|
||
|
||
# Despliegue en modo desarrollo | ||
if (test "$IPDES" = "") then { | ||
export IPDES=192.168.10.1 | ||
} fi; | ||
if (test "$PUERTODES" = "") then { | ||
export PUERTODES=3000 | ||
} fi; | ||
|
||
|
||
# Despliegue en modo producción con unicorn | ||
if (test "$RC" = "") then { | ||
export RC=sip | ||
} fi; | ||
if (test "$PUERTOUNICORN" = "") then { | ||
export PUERTOUNICORN=3015 | ||
} fi; | ||
if (test "$USUARIO_AP" = "") then { | ||
export USUARIO_AP=miusuario | ||
} fi; | ||
if (test "$SECRET_KEY_BASE" = "") then { | ||
export SECRET_KEY_BASE=123456789abcdef | ||
} fi; | ||
|
||
|
||
# Configuraciones de sip | ||
if (test "$SIP_FORMATO_FECHA" = "") then { | ||
export SIP_FORMATO_FECHA='dd/M/yyyy' | ||
} fi; | ||
if (test "$SIP_RUTA_ANEXOS" = "") then { | ||
export SIP_RUTA_ANEXOS=${DIRAP}/archivos/anexos | ||
} fi; | ||
if (test "$SIP_RUTA_VOLCADOS" = "") then { | ||
export SIP_RUTA_VOLCADOS=${DIRAP}/archivos/bd | ||
} fi; | ||
|
||
|
||
# export IPDES="ssl://192.168.1.3:2300?key=tmp/llave-privada.key&cert=tmp/llave-publica.crt" # IP en modo desarrollo con https | ||
# export PUERTODES= # Puerto en modo desarrollo con https |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# Detiene servicio | ||
|
||
if (test -f ".env") then { | ||
. .env | ||
} fi; | ||
if (test "$RC" = "") then { | ||
echo "Falta RC en .env" | ||
exit 1 | ||
} fi; | ||
if (test "$RAILS_ENV" = "production") then { | ||
if (test ! -f /etc/rc.d/$RC) then { | ||
echo "Falta script /etc/rc.d/$RC" | ||
exit 1; | ||
} fi; | ||
|
||
doas sh /etc/rc.d/$RC -d stop | ||
} fi; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
# Actualiza fuentes y base de datos | ||
|
||
if (test -f ".env") then { | ||
. .env | ||
} fi; | ||
if (test "${RAILS_ENV}" = "") then { | ||
RAILS_ENV=development | ||
} fi; | ||
bin/detiene | ||
if (test "$?" != "0") then { | ||
echo "Problema al detener"; | ||
exit 1; | ||
} fi; | ||
git pull | ||
if (test "$?" != "0") then { | ||
echo "Problema con git pull"; | ||
exit 1; | ||
} fi; | ||
bundle install | ||
if (test "$?" != "0") then { | ||
echo "Problema con bundle install"; | ||
exit 1; | ||
} fi; | ||
CXX=c++ yarn install | ||
echo "BD_USUARIO=${BD_USUARIO}" | ||
echo "BD_CLAVE=${BD_CLAVE}" | ||
echo "BD_DES=${BD_DES}" | ||
bin/rails db:prepare RAILS_ENV=$RAILS_ENV BD_USUARIO=$BD_USUARIO \ | ||
BD_CLAVE=$BD_CLAVE BD_PRO=$BD_PRO BD_DES=$BD_DES BD_PRUEBA=$BD_PRUEBA | ||
if (test "$?" != "0") then { | ||
echo "Problema con db:migrate"; | ||
exit 1; | ||
} fi; | ||
bin/corre | ||
if (test "$?" != "0") then { | ||
echo "Problema al volver a iniciar"; | ||
exit 1; | ||
} fi; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Dummy::Application.config.relative_url_root = ENV.fetch( | ||
'RUTA_RELATIVA', '/jn316') | ||
Dummy::Application.config.assets.prefix = ENV.fetch( | ||
'RUTA_RELATIVA', '/jn316') + '/assets' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.