Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ajustes Prodesp Oracle #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tests/Selenium/PythonExported/__pycache__
tests/Selenium/PythonExported/resultado.xml
tests/Selenium/PythonExported/test_suiteBasics-executar.py
tests/Selenium/PythonExported/test_suiteBasics-executar.py-e

containers/app/app-base/command.txt
Binary file added containers/.DS_Store
Binary file not shown.
14 changes: 10 additions & 4 deletions containers/app/app-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
# Dockerfile de construcao do container APP com os pacotes basicos
################################################################################

ARG IMAGEM_BASE=processoeletronico/base-centos7:latest
LABEL io.k8s.display-name="SEI - construcao do container APP com os pacotes basicos" \
io.k8s.description="Imagem para construcao do container APP com os pacotes basicos do SEI." \
maintainer="Sandro Tanaka <[email protected]>" \
vendor="Red Hat Inc" \
sei-version="4.X.0"

ARG IMAGEM_BASE=supergovbr/base-centos8:latest
#ARG IMAGEM_BASE=quay.io/stanaka-redhat/sei-redhat-base-ubi:4.0.0

FROM ${IMAGEM_BASE}

ARG IMAGEM_APP_PACOTEMYSQL_PRESENTE=true
ARG IMAGEM_APP_PACOTESQLSERVER_PRESENTE=true
ARG IMAGEM_APP_PACOTEMYSQL_PRESENTE=false
ARG IMAGEM_APP_PACOTESQLSERVER_PRESENTE=false
ARG IMAGEM_APP_PACOTEORACLE_PRESENTE=true
ARG IMAGEM_APP_PACOTEPOSTGRES_PRESENTE=true

ENV TERM="xterm" \
LANG="pt_BR.ISO-8859-1"
Expand Down
40 changes: 0 additions & 40 deletions containers/app/app-base/assets/ca-certIN.pem

This file was deleted.

4 changes: 2 additions & 2 deletions containers/app/app-base/assets/copy-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ curl -L -O \
-O \
https://github.com/spbgovbr/sei-docker-binarios/raw/main/pacoteslinux/uploadprogress.tgz \
-O \
https://github.com/spbgovbr/sei-docker-binarios/raw/main/pacoteslinux/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm

cd -
cd -
58 changes: 30 additions & 28 deletions containers/app/app-base/assets/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ set -e
yum clean all
yum -y update

#yum -y install epel-release
#subscription-manager repos --enable rhel-*-optional-rpms \
# --enable rhel-*-extras-rpms \
# --enable rhel-ha-for-rhel-*-server-rpms

#yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm


# Instalação dos componentes básicos do servidor web apache
yum -y install \
httpd \
Expand All @@ -26,10 +35,20 @@ yum -y install \
fontconfig \
mod_ssl

openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt \
-subj "/C=BR/ST=Brasilia/L=Brasilia/O=TESTE/OU=MGI/CN=localhost"


# Instalação do PHP e demais extenções necessárias para o projeto
yum install -y epel-release yum-utils
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y yum-utils dnf-plugins-core
yum install -y http://rpms.remirepo.net/enterprise/remi-release-8.rpm
yum module reset php -y
#yum module enable php:remi-7.3 -y
yum install yum-utils
yum-config-manager --enable remi-php73
dnf module install php:remi-7.3

dnf config-manager --set-enabled powertools
yum -y update

# Instalação do PHP e demais extenções necessárias para o projeto
Expand Down Expand Up @@ -65,26 +84,16 @@ yum -y install \
php-pecl-zip \
gearmand \
libgearman \
libgearman-devel \
php-pecl-gearman \
vixie-cron \
cronie \
php-sodium \
git \
gearmand \
libgearman-dev \
libgearman-devel

cd /tmp/assets/
cp ca-certIN.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust extract
update-ca-trust enable
git

cd /tmp/assets/pacotes

# Configuração do pacote de línguas pt_BR
localedef pt_BR -i pt_BR -f ISO-8859-1
localedef pt_BR.ISO-8859-1 -i pt_BR -f ISO-8859-1
localedef pt_BR.ISO8859-1 -i pt_BR -f ISO-8859-1
dnf install glibc-locale-source glibc-langpack-br -y
localedef -c -i pt_BR -f ISO-8859-1 pt_BR.ISO-8859-1

# Instalação do componentes UploadProgress
tar -zxvf uploadprogress.tgz
Expand All @@ -97,7 +106,7 @@ echo "extension=uploadprogress.so" > /etc/php.d/uploadprogress.ini
cd -

# wkhtml
rpm -Uvh wkhtmltox-0.12.6-1.centos7.x86_64.rpm
rpm -Uvh wkhtmltox-0.12.6-1.centos8.x86_64.rpm

# fonts libraries
rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm
Expand All @@ -111,9 +120,9 @@ fi
if [ "$IMAGEM_APP_PACOTESQLSERVER_PRESENTE" == "true" ]; then

# Instalação dos componentes de conexão do SQL Server
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
ACCEPT_EULA=Y yum install -y msodbcsql17
yum install -y libtool-ltdl-devel libodbc1 unixODBC unixODBC-devel php-mssql php-pdo
yum install -y libtool-ltdl-devel unixODBC unixODBC-devel php-pdo
pecl channel-update pecl.php.net
pecl install sqlsrv-5.10.1 pdo_sqlsrv-5.10.1
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php.d/20-sqlsrv.ini
Expand All @@ -129,7 +138,7 @@ fi
if [ "$IMAGEM_APP_PACOTEORACLE_PRESENTE" == "true" ]; then

# ORACLE oci

yum install -y libnsl
yum install -y \
oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm \
oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm \
Expand All @@ -139,19 +148,12 @@ if [ "$IMAGEM_APP_PACOTEORACLE_PRESENTE" == "true" ]; then
ldconfig

# Install Oracle extensions
yum install -y php-dev php-pear build-essential systemtap-sdt-devel
yum install -y gcc gcc-c++ make php-devel php-pear systemtap-sdt-devel
pecl channel-update pecl.php.net
export PHP_DTRACE=yes && pecl install oci8-2.2.0 && unset PHP_DTRACE

echo "extension=oci8.so" > /etc/php.d/oci8.ini

fi

if [ "$IMAGEM_APP_PACOTEPOSTGRES_PRESENTE" == "true" ]; then

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql15 postgresql15-libs php-pgsql php-pecl-pq

fi

cd -
38 changes: 38 additions & 0 deletions containers/app/app-ci-41/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
################################################################################
# Dockerfile de construcao do container APP com os pacotes basicos
################################################################################

LABEL io.k8s.display-name="SEI - construcao do container APP com os pacotes basicos" \
io.k8s.description="Imagem para construcao do container APP com os pacotes basicos do SEI." \
maintainer="Sandro Tanaka <[email protected]>" \
vendor="Red Hat Inc" \
sei-version="4.1.0"

ARG IMAGEM_BASE=supergovbr/base-app:latest

FROM ${IMAGEM_BASE}

ADD assets /tmp/assets
COPY assets/source /tmp/source

ARG GITPASS_REPO_MODULOS
ARG GITUSER_REPO_MODULOS

#RUN mv /tmp/assets/source/sei /opt/
#RUN mv /tmp/assets/source/sip /opt/
#RUN mv /tmp/assets/source/infra /opt/

RUN /tmp/assets/install.sh && \
rm -rf /tmp/assets && \
sed -i 's+^post_max_size = 8M+post_max_size = 120M+g;s+^upload_max_filesize = 2M+upload_max_filesize = 100M+g;s+^short_open_tag = Off+short_open_tag = On+g;s+;mysqli.allow_local_infile = On+mysqli.allow_local_infile = On+g' /etc/php.ini && \
sed -i 's+pid = /run/php-fpm/php-fpm.pid+pid = /run/httpd/php-fpm.pid+g' /etc/php-fpm.conf && \
sed -i 's+listen = /run/php-fpm/www.sock+listen = 9000+g' /etc/php-fpm.d/www.conf && \
sed -i 's+SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"+SetHandler "proxy:fcgi://127.0.0.1:9000"+g' /etc/httpd/conf.d/php.conf && \
sed -i 's+UserDir disabled+UserDir html+g;s+tory "/home/\*/public_html">+tory "/var/*/html">+g' /etc/httpd/conf.d/userdir.conf && \
echo "alias ll='ls -l'" >> /etc/bashrc && \
DOTHT_NUM=$(grep -n '^<Files ".ht' /etc/httpd/conf/httpd.conf | awk -F: '{print $1+1}') && \
sed -i "${DOTHT_NUM}s+Require all denied+Require all granted+g;s+#ServerName www.example.com:80+ServerName localhost+g" /etc/httpd/conf/httpd.conf && \
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php-fpm.d/www.conf

EXPOSE 80
#EXPOSE 443
95 changes: 95 additions & 0 deletions containers/app/app-ci-41/assets/conf/ConfiguracaoSEI.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?

class ConfiguracaoSEI extends InfraConfiguracao {

private static $instance = null;

public static function getInstance(){
if (ConfiguracaoSEI::$instance == null) {
ConfiguracaoSEI::$instance = new ConfiguracaoSEI();
}
return ConfiguracaoSEI::$instance;
}

public function getArrConfiguracoes(){
return array(

'SEI' => array(
'URL' => getenv('APP_PROTOCOLO').'://'.getenv('APP_HOST').'/sei',
'Producao' => false,
'RepositorioArquivos' => '/sei/arquivos_externos_sei',
'Modulos' => array(/*novomodulo*/),
),

/*extramodulesconfig*/

'PaginaSEI' => array(
'NomeSistema' => 'SEI',
'NomeSistemaComplemento' => getenv('APP_NOMECOMPLEMENTO'),
'LogoMenu' => ''),

'SessaoSEI' => array(
'SiglaOrgaoSistema' => getenv('APP_ORGAO'),
'SiglaSistema' => 'SEI',
'PaginaLogin' => getenv('APP_PROTOCOLO').'://'.getenv('APP_HOST').'/sip/login.php',
'SipWsdl' => getenv('APP_PROTOCOLO').'://'.getenv('APP_HOST').'/sip/controlador_ws.php?servico=sip',
'ChaveAcesso' => getenv('APP_SEI_CHAVE_ACESSO'),
'https' => (getenv('APP_PROTOCOLO') == 'https' ? true : false)),

'BancoSEI' => array(
'Servidor' => getenv('APP_DB_HOST'),
'Porta' => getenv('APP_DB_PORTA'),
'Banco' => getenv('APP_DB_SEI_BASE'),
'Usuario' => getenv('APP_DB_SEI_USERNAME'),
'Senha' => getenv('APP_DB_SEI_PASSWORD'),
'UsuarioScript' => getenv('APP_DB_SEI_USERNAME'),
'SenhaScript' => getenv('APP_DB_SEI_PASSWORD'),
'Tipo' => getenv('APP_DB_TIPO')), //MySql, SqlServer, Oracle ou PostgreSql

/*
'BancoAuditoriaSEI' => array(
'Servidor' => '[servidor BD]',
'Porta' => '',
'Banco' => '',
'Usuario' => '',
'Senha' => '',
'Tipo' => ''), //MySql, SqlServer, Oracle ou PostgreSql
*/

'CacheSEI' => array('Servidor' => getenv('APP_MEMCACHED_HOST'),
'Porta' => '11211'),

'Federacao' => array(
'Habilitado' => false
),

'JODConverter' => array('Servidor' => 'http://jod:8080/converter/service'),

'Solr' => array(
'Servidor' => getenv('APP_SOLR_URL'),
'CoreProtocolos' => getenv('APP_SOLR_CORE_PROTOCOLOS'),
'TempoCommitProtocolos' => getenv('APP_SOLR_TEMPO_COMMIT_PROTOCOLOS'),
'CoreBasesConhecimento' => getenv('APP_SOLR_CORE_BASECONHECIMENTO'),
'TempoCommitBasesConhecimento' => getenv('APP_SOLR_TEMPO_COMMIT_BASECONHECIMENTO'),
'CorePublicacoes' => getenv('APP_SOLR_CORE_PUBLICACOES'),
'TempoCommitPublicacoes' => getenv('APP_SOLR_TEMPO_COMMIT_PUBLICACOES')),



'InfraMail' => array(
'Tipo' => getenv('APP_MAIL_TIPO'), //1 = sendmail (neste caso n�o � necess�rio configurar os atributos abaixo), 2 = SMTP
'Servidor' => getenv('APP_MAIL_SERVIDOR'),
'Porta' => getenv('APP_MAIL_PORTA'),
'Codificacao' => getenv('APP_MAIL_CODIFICACAO'), //8bit, 7bit, binary, base64, quoted-printable
'MaxDestinatarios' => getenv('APP_MAIL_MAXDESTINATARIOS'), //numero maximo de destinatarios por mensagem
'MaxTamAnexosMb' => getenv('APP_MAIL_MAXTAMANHOANEXOSMB'), //tamanho maximo dos anexos em Mb por mensagem
'Seguranca' => getenv('APP_MAIL_SEGURANCA'), //TLS, SSL ou vazio
'Autenticar' => getenv('APP_MAIL_AUTENTICAR'), //se true ent�o informar Usuario e Senha
'Usuario' => getenv('APP_MAIL_USUARIO'),
'Senha' => getenv('APP_MAIL_SENHA'),
'Protegido' => getenv('APP_MAIL_PROTEGIDO') //campo usado em desenvolvimento, se tiver um email preenchido entao todos os emails enviados terao o destinatario ignorado e substitu�do por este valor evitando envio incorreto de email
)
);
}
}
?>
Loading