-
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.
- Loading branch information
0 parents
commit e01aeb3
Showing
10 changed files
with
328 additions
and
0 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,22 @@ | ||
name: Update Docker Hub Description | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- README.md | ||
- .github/workflows/dockerhub-description.yml | ||
jobs: | ||
dockerHubDescription: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v4 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: processoeletronico/sei5-alpine | ||
short-description: ${{ github.event.repository.description }} | ||
enable-url-completion: true |
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,43 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'Dockerfile' | ||
- 'assets/**' | ||
- '.github/workflows/publish.yml' | ||
tags: | ||
- "*.*.*" | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
processoeletronico/sei5-alpine | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} | ||
type=pep440,pattern={{major}}.{{minor}} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,97 @@ | ||
################################################################################ | ||
# Dockerfile de construcao do container APP com os pacotes basicos | ||
################################################################################ | ||
|
||
FROM almalinux:9 | ||
|
||
LABEL \ | ||
org.opencontainers.image.title="Imagem docker para SEI 5 em php" | ||
|
||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm; \ | ||
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm; \ | ||
dnf module install -y php:remi-8.2 | ||
|
||
RUN dnf --enablerepo=crb install -y aspell | ||
RUN dnf install -y \ | ||
php-mbstring \ | ||
php-bcmath \ | ||
php-bz2 \ | ||
php-calendar \ | ||
php-ctype \ | ||
php-curl \ | ||
php-dom \ | ||
php-exif \ | ||
php-fileinfo \ | ||
php-gd \ | ||
php-gettext \ | ||
php-gmp \ | ||
php-iconv \ | ||
php-imap \ | ||
php-intl \ | ||
php-ldap \ | ||
php-mbstring \ | ||
php-mysqli \ | ||
php-odbc \ | ||
php-openssl \ | ||
php-pcntl \ | ||
php-pdo \ | ||
php-pear \ | ||
php-pecl-apcu \ | ||
php-pecl-igbinary \ | ||
php-pecl-mcrypt \ | ||
php-pecl-memcache \ | ||
php-pecl-xdebug \ | ||
php-pgsql \ | ||
php-phar \ | ||
php-pspell \ | ||
php-simplexml \ | ||
php-sodium \ | ||
php-shmop \ | ||
php-snmp \ | ||
php-soap \ | ||
php-xml \ | ||
php-zip \ | ||
php-zlib \ | ||
php-pecl-uploadprogress; \ | ||
dnf install -y \ | ||
httpd \ | ||
xorg-x11-fonts-75dpi \ | ||
xorg-x11-fonts-Type1 \ | ||
libpng \ | ||
libjpeg \ | ||
openssl \ | ||
icu \ | ||
libX11 \ | ||
libXext \ | ||
libXrender; \ | ||
dnf install -y wget ; \ | ||
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm ; \ | ||
dnf install -y ./wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm; \ | ||
rm -f ./wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm; \ | ||
dnf install -y glibc-locale-source; \ | ||
dnf install -y java-1.8.0-openjdk; \ | ||
dnf clean all; | ||
|
||
COPY assets/sei.ini /etc/php.d/99_sei.ini | ||
COPY assets/sei.ini /etc/php-fpm.d/99_sei.ini | ||
COPY assets/xdebug.ini /etc/php.d/99_xdebug.ini | ||
COPY assets/sei.conf /etc/httpd/conf.d/ | ||
|
||
# Pasta para arquivos externos | ||
RUN mkdir -p /var/sei/arquivos && chown -R apache.apache /var/sei/arquivos && chmod 777 /tmp | ||
|
||
RUN mkdir -p /var/log/sei && mkdir -p /var/log/sip | ||
RUN sed -e 's/127.0.0.1:9000/9000/' \ | ||
-e '/allowed_clients/d' \ | ||
-e '/catch_workers_output/s/^;//' \ | ||
-e '/error_log/d' \ | ||
-e 's/;clear_env = no/clear_env = no/' \ | ||
-i /etc/php-fpm.d/www.conf | ||
|
||
RUN mkdir -p /run/php-fpm | ||
RUN 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 | ||
|
||
EXPOSE 8000 | ||
CMD ["bash", "-c", "php-fpm && httpd -DFOREGROUND"] |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 PEN - Processo Eletrônico Nacional | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,9 @@ | ||
# sei5-alma9 | ||
|
||
Imagem docker para SEI 5 no PHP82 no Alma9 - Versão DEV | ||
|
||
Essa imagem serve somente para MySQL, MariaDB e Postgres. | ||
|
||
Bancos de oracle e sqlserver não tem suporte. | ||
|
||
Cron não instalado. |
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,2 @@ | ||
* * * * * /usr/bin/php /opt/sei/scripts/AgendamentoTarefaSEI.php 2>&1 >> /var/log/sei/agendamento_sei.log | ||
* * * * * /usr/bin/php /opt/sip/scripts/AgendamentoTarefaSip.php 2>&1 >> /var/log/sip/agendamento_sip.log |
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,57 @@ | ||
<?php | ||
$serverName = "database"; | ||
$connectionOptions = array( | ||
"database" => "sei", | ||
"uid" => "sei_user", | ||
"pwd" => "sei_user" | ||
); | ||
|
||
function exception_handler($exception) { | ||
echo "<h1>Failure</h1>"; | ||
echo "Uncaught exception: " , $exception->getMessage(); | ||
echo "<h1>PHP Info for troubleshooting</h1>"; | ||
phpinfo(); | ||
} | ||
|
||
set_exception_handler('exception_handler'); | ||
|
||
// Establishes the connection | ||
$conn = sqlsrv_connect($serverName, $connectionOptions); | ||
if ($conn === false) { | ||
die(formatErrors(sqlsrv_errors())); | ||
} | ||
|
||
// Select Query | ||
$tsql = "SELECT @@Version AS SQL_VERSION"; | ||
|
||
// Executes the query | ||
$stmt = sqlsrv_query($conn, $tsql); | ||
|
||
// Error handling | ||
if ($stmt === false) { | ||
die(formatErrors(sqlsrv_errors())); | ||
} | ||
?> | ||
|
||
<h1> Success Results : </h1> | ||
|
||
<?php | ||
while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) { | ||
echo $row['SQL_VERSION'] . PHP_EOL; | ||
} | ||
|
||
sqlsrv_free_stmt($stmt); | ||
sqlsrv_close($conn); | ||
|
||
function formatErrors($errors) | ||
{ | ||
// Display errors | ||
echo "<h1>SQL Error:</h1>"; | ||
echo "Error information: <br/>"; | ||
foreach ($errors as $error) { | ||
echo "SQLSTATE: ". $error['SQLSTATE'] . "<br/>"; | ||
echo "Code: ". $error['code'] . "<br/>"; | ||
echo "Message: ". $error['message'] . "<br/>"; | ||
} | ||
} | ||
?> |
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,50 @@ | ||
Listen 8000 | ||
KeepAlive On | ||
MaxKeepAliveRequests 100 | ||
KeepAliveTimeout 15 | ||
|
||
Alias "/sei" "/opt/sei/web" | ||
Alias "/sip" "/opt/sip/web" | ||
Alias "/infra_css" "/opt/infra/infra_css" | ||
Alias "/infra_js" "/opt/infra/infra_js" | ||
|
||
SetEnvIfNoCase user-agent "Microsoft Data Access Internet Publishing Provider Protocol Discovery" bad_bot=1 | ||
|
||
<FilesMatch "(.*)"> | ||
Order Allow,Deny | ||
Allow from all | ||
Deny from env=bad_bot | ||
</FilesMatch> | ||
|
||
<VirtualHost *:8000> | ||
DocumentRoot /var/www/html | ||
ServerAdmin [email protected] | ||
ServerName localhost | ||
|
||
# Enable http authorization headers | ||
|
||
|
||
DirectoryIndex index.php index.html | ||
IndexIgnore * | ||
EnableSendfile Off | ||
HostnameLookups Off | ||
ServerSignature Off | ||
AddDefaultCharset iso-8859-1 | ||
|
||
<Directory /> | ||
AllowOverride None | ||
Require all denied | ||
</Directory> | ||
|
||
<Directory ~ "(/opt/sei/web|/opt/sip/web|/opt/infra/infra_css|/opt/infra/infra_js)" > | ||
AllowOverride None | ||
Options None | ||
Require all granted | ||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 | ||
|
||
<FilesMatch \.(php|phar)$> | ||
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" | ||
</FilesMatch> | ||
</Directory> | ||
|
||
</VirtualHost> |
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,20 @@ | ||
[php] | ||
; Parâmetros recomendados no Manual de Instalação | ||
include_path = ".:/php/includes:/opt/infra/infra_php" | ||
default_charset = "iso-8859-1" | ||
session.gc_maxlifetime = 28800 | ||
short_open_tag = On | ||
default_socket_timeout = 60 | ||
max_input_vars = 2000 | ||
magic-quotes-gpc = 0 | ||
magic_quotes_runtime = 0 | ||
magic_quotes_sybase = 0 | ||
post_max_size = 110M | ||
upload_max_filesize = 100M | ||
|
||
; Parâmetros recomendados para ambiente de desenvolvimento | ||
error_reporting = E_ALL | ||
display_errors = On | ||
display_startup_errors = On | ||
html_errors = On | ||
always_populate_raw_post_data = -1 |
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,7 @@ | ||
zend_extension=xdebug.so | ||
xdebug.mode=debug | ||
xdebug.client_host=localhost | ||
xdebug.client_port=9003 | ||
xdebug.remote_handler=dbgp | ||
xdebug.discover_client_host=1 | ||
xdebug.idekey=default |