Skip to content

Commit 5389c25

Browse files
authored
Merge pull request #6 from secultce/main
Merge main to homolog
2 parents 237ae55 + 1ac99df commit 5389c25

File tree

15 files changed

+1378
-1156
lines changed

15 files changed

+1378
-1156
lines changed

.github/workflows/ci.yml

+23-67
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,31 @@
11
name: ci
22

33
on:
4-
# schedule:
5-
# - cron: "0 10 * * *"
6-
push:
7-
branches:
8-
- "master"
9-
- "develop"
10-
tags:
11-
- "v*.*.*"
124
pull_request:
13-
branches:
14-
- "develop"
15-
5+
branches:
6+
- homolog
167
jobs:
17-
docker:
8+
CI:
189
runs-on: ubuntu-latest
19-
steps:
20-
-
21-
name: Checkout
22-
uses: actions/checkout@v3
23-
-
24-
name: Docker meta
25-
id: meta
26-
uses: docker/metadata-action@v4
27-
with:
28-
# list of Docker images to use as base name for tags
29-
images: |
30-
docker.io/hacklab/mapasculturais
31-
# ghcr.io/username/app
32-
# generate Docker tags based on the following events/attributes
33-
tags: |
34-
type=ref,event=branch
35-
type=semver,pattern={{version}}
36-
type=semver,pattern={{major}}.{{minor}}
37-
type=semver,pattern={{major}}
38-
-
39-
name: Set up QEMU
40-
uses: docker/setup-qemu-action@v2
41-
-
42-
name: Set up Docker Buildx
43-
uses: docker/setup-buildx-action@v2
44-
-
45-
name: Login to Docker Hub
46-
if: github.event_name != 'pull_request'
47-
uses: docker/login-action@v2
10+
steps:
11+
12+
- uses: actions/checkout@v4.1.1
13+
14+
- name: Docker Login
15+
uses: docker/login-action@v3.0.0
4816
with:
49-
username: ${{ secrets.DOCKERHUB_USERNAME }}
50-
password: ${{ secrets.DOCKERHUB_TOKEN }}
51-
# -
52-
# name: Login to GHCR
53-
# if: github.event_name != 'pull_request'
54-
# uses: docker/login-action@v2
55-
# with:
56-
# registry: ghcr.io
57-
# username: ${{ github.repository_owner }}
58-
# password: ${{ secrets.GITHUB_TOKEN }}
59-
-
60-
name: Build and push
61-
uses: docker/build-push-action@v4
17+
username: ${{ secrets.DOCKERHUB_USER }}
18+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
19+
20+
- name: Checkout submodules
21+
run: git submodule update --init --recursive
22+
23+
- name: Criação da Imagem docker
24+
uses: docker/build-push-action@v5.0.0
6225
with:
63-
context: .
64-
push: ${{ github.event_name != 'pull_request' }}
65-
tags: ${{ steps.meta.outputs.tags }}
66-
labels: ${{ steps.meta.outputs.labels }}
67-
-
68-
name: Build and push develop-cli
69-
uses: docker/build-push-action@v4
70-
with:
71-
file: ./compose/local/Dockerfile
72-
context: .
73-
push: ${{ github.event_name != 'pull_request' }}
74-
tags: docker.io/hacklab/mapasculturais:develop-cli
75-
labels: ${{ steps.meta.outputs.labels }}
26+
context: ./
27+
file: ./Dockerfile
28+
push: true
29+
tags: |
30+
secultceara/mapasculturais:5.8.15
31+
secultceara/mapasculturais:latest

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ src/protected/application/themes/mapasculturais-*
1515
src/protected/vendor
1616
src/pub
1717
src/assets
18-
src/protected/application/themes/Ceara
18+
# src/protected/application/themes/Ceara
1919
compose/config.d/z.config.local.php
2020
*.log
2121
.idea

.gitmodules

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "src/protected/application/plugins/MultipleLocalAuth"]
2+
path = src/protected/application/plugins/MultipleLocalAuth
3+
url = https://github.com/mapasculturais/plugin-MultipleLocalAuth
4+
branch = master
5+
[submodule "src/protected/application/plugins/Recourse"]
6+
path = src/protected/application/plugins/Recourse
7+
url = https://github.com/secultce/plugin-Recourse.git
8+
branch = main
9+
[submodule "src/protected/application/themes/Ceara"]
10+
path = src/protected/application/themes/Ceara
11+
url = https://github.com/secultce/theme-Ceara.git
12+
branch = master

Dockerfile

+50-71
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,70 @@
11
FROM php:7.2-fpm
22

3-
RUN apt-get update && apt-get install -y --no-install-recommends \
4-
curl libcurl4-gnutls-dev locales imagemagick libmagickcore-dev libmagickwand-dev zip \
5-
ruby ruby-dev libpq-dev gnupg nano iputils-ping git \
6-
libfreetype6-dev libjpeg62-turbo-dev libpng-dev less vim \
7-
sudo procps
8-
9-
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
10-
&& apt-get install -y nodejs
11-
12-
RUN rm -rf /var/lib/apt/lists
13-
14-
# Install uglify and terser
15-
RUN npm install -g \
16-
terser \
17-
uglifycss \
18-
autoprefixer
19-
20-
# Install sass
21-
RUN gem install sass -v 3.4.22
22-
23-
# Install extensions
24-
RUN docker-php-ext-install opcache pdo_pgsql zip xml curl json
25-
26-
# Install GD
27-
RUN docker-php-ext-install -j$(nproc) iconv \
28-
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
29-
&& docker-php-ext-install -j$(nproc) gd
30-
31-
# Install APCu
32-
RUN pecl install apcu \
33-
&& echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apcu.ini
34-
35-
# Install imagick
36-
RUN pecl install imagick-beta \
37-
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini
38-
39-
# Install composer
40-
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
41-
php composer-setup.php --version=1.10.16 --install-dir=/usr/local/bin && \
42-
rm composer-setup.php
43-
44-
# Install redis
45-
RUN pecl install -o -f redis \
46-
&& rm -rf /tmp/pear \
47-
&& docker-php-ext-enable redis
48-
493
# Copy source
504
COPY src/index.php /var/www/html/index.php
51-
COPY src/protected/composer.json /var/www/html/protected/composer.json
52-
COPY src/protected/composer.lock /var/www/html/protected/composer.lock
53-
54-
WORKDIR /var/www/html/protected
55-
RUN composer.phar install
56-
57-
RUN mkdir -p /var/www/html/protected/vendor /var/www/.composer && \
58-
chown -R www-data:www-data /var/www/html/protected/vendor /var/www/.composer
59-
60-
61-
COPY src/protected/application/themes /var/www/html/protected/application/themes
62-
63-
WORKDIR /var/www/html/protected/application/themes/
64-
65-
RUN find . -maxdepth 1 -mindepth 1 -exec echo "compilando sass do tema " {} \; -exec sass {}/assets/css/sass/main.scss {}/assets/css/main.css -E "UTF-8" \;
66-
675
COPY src/protected /var/www/html/protected
68-
69-
RUN mkdir -p /var/www/html/protected/DoctrineProxies
70-
RUN chown -R www-data: /var/www/html/protected/DoctrineProxies
71-
72-
RUN ln -s /var/www/html/protected/application/lib/postgis-restful-web-service-framework /var/www/html/geojson
73-
746
COPY scripts /var/www/scripts
7+
758
COPY compose/production/php.ini /usr/local/etc/php/php.ini
769
COPY compose/config.php /var/www/html/protected/application/conf/config.php
7710
COPY compose/config.d /var/www/html/protected/application/conf/config.d
7811

79-
RUN ln -s /var/www/html /var/www/src
12+
COPY compose/common/config.php /var/www/html/protected/application/conf/config.php
13+
COPY compose/common/config.d /var/www/html/protected/application/conf/conf-common.d
14+
COPY compose/production/config.d /var/www/html/protected/application/conf/config.d
8015

8116
COPY version.txt /var/www/version.txt
82-
8317
COPY compose/jobs-cron.sh /jobs-cron.sh
8418
COPY compose/recreate-pending-pcache-cron.sh /recreate-pending-pcache-cron.sh
8519
COPY compose/entrypoint.sh /entrypoint.sh
20+
21+
RUN apt-get update && apt-get install -y --no-install-recommends \
22+
curl libcurl4-gnutls-dev locales imagemagick libmagickcore-dev libmagickwand-dev zip \
23+
ruby ruby-dev libpq-dev gnupg git \
24+
libfreetype6-dev libjpeg62-turbo-dev libpng-dev sudo procps \
25+
#instalação do node 14
26+
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
27+
&& apt-get install -y nodejs \
28+
# Install uglify and terser
29+
&& npm install -g \
30+
terser \
31+
uglifycss \
32+
autoprefixer \
33+
# Install sass
34+
&& gem install sass -v 3.4.22 \
35+
# Install extensions
36+
&& docker-php-ext-install opcache pdo_pgsql zip xml curl json \
37+
# Install GD
38+
&& docker-php-ext-install -j$(nproc) iconv \
39+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
40+
&& docker-php-ext-install -j$(nproc) gd \
41+
# Install APCu
42+
&& pecl install apcu \
43+
&& echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apcu.ini \
44+
# Install imagick
45+
&& pecl install imagick-beta \
46+
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
47+
# Install composer
48+
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
49+
php composer-setup.php --version=1.10.16 --install-dir=/usr/local/bin && \
50+
rm composer-setup.php \
51+
# Install redis
52+
&& pecl install -o -f redis \
53+
&& rm -rf /tmp/pear \
54+
&& docker-php-ext-enable redis \
55+
# Instalação da pasta vendor
56+
&& cd /var/www/html/protected && composer.phar install \
57+
&& cd /var/www/html/protected/application/themes/ \
58+
&& find . -maxdepth 1 -mindepth 1 -exec echo "compilando sass do tema " {} \; -exec sass {}/assets/css/sass/main.scss {}/assets/css/main.css -E "UTF-8" \; \
59+
&& mkdir -p /var/www/html/protected/DoctrineProxies \
60+
&& ln -s /var/www/html/protected/application/lib/postgis-restful-web-service-framework /var/www/html/geojson \
61+
&& ln -s /var/www/html /var/www/src \
62+
&& chown -R www-data:www-data /var/www/ \
63+
&& apt-get clean && rm -rf /var/lib/apt/lists
64+
8665
ENTRYPOINT ["/entrypoint.sh"]
8766

8867
WORKDIR /var/www/html/
8968
EXPOSE 9000
9069

91-
CMD ["php-fpm"]
70+
CMD ["php-fpm"]

README.md

+51
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,40 @@ A plataforma já está em uso em diversos municipios, estados, no governo federa
1818
- Cultura Viva - http://culturaviva.gov.br/
1919
- Pontos de Memória - http://pontosdememoria.cultura.gov.br/
2020

21+
### Instalações estaduais
22+
- Distrito Federal - http://mapa.cultura.df.gov.br/
23+
- Ceará - https://mapacultural.secult.ce.gov.br/
24+
- Espírito Santo - https://mapa.cultura.es.gov.br/
25+
- Goiás - https://mapagoiano.cultura.go.gov.br/
26+
- Maranhão - http://ma.mapas.cultura.gov.br/
27+
- Mato Grosso - https://mapas.mt.gov.br/
28+
- Mato Grosso do Sul - https://www.mapacultural.ms.gov.br/
29+
- Pará - https://mapacultural.pa.gov.br/
30+
- Paraíba - http://pb.mapas.cultura.gov.br/
31+
- Pernambuco - https://www.mapacultural.pe.gov.br/
32+
- Sergipe - http://mapas.cultura.se.gov.br/
33+
- Tocantins - http://mapa.cultura.to.gov.br/
34+
### Instalações municipais
35+
- Ilheus - http://ilheus.ba.mapas.cultura.gov.br/
36+
- Camaçari - https://mapacultural.camacari.ba.gov.br/
37+
- Senhor do Bonfim - http://senhordobonfim.ba.mapas.cultura.gov.br/
38+
- Chorozinho - https://mapacultural.chorozinho.ce.gov.br/
39+
- Sobral - https://cultura.sobral.ce.gov.br/
40+
- Juazeiro do Norte - https://mapacultural.juazeiro.ce.gov.br/
41+
- Belo Horizonte - http://mapaculturalbh.pbh.gov.br/
42+
- Santa Luzia - http://mapacultural.santaluzia.mg.gov.br/
43+
- Ipatinga - http://mapacultural.ipatinga.mg.gov.br/
44+
- Varzea Grande - http://varzeagrande.mt.mapas.cultura.gov.br/
45+
- João Pessoa - http://jpcultura.joaopessoa.pb.gov.br/
46+
- Londrina - https://londrinacultura.londrina.pr.gov.br/### Instalações em nível federal ou internacional
47+
- IberculturaViva - https://mapa.iberculturaviva.org/
48+
- Mapa Uruguai - http://culturaenlinea.uy/
49+
- SNIIC - http://mapas.cultura.gov.br/
50+
- Museus - http://museus.cultura.gov.br/
51+
- Sistema Nacional de Bibliotecas Públicas - http://bibliotecas.cultura.gov.br/
52+
- Cultura Viva - http://culturaviva.gov.br/
53+
- Pontos de Memória - http://pontosdememoria.cultura.gov.br/
54+
2155
### Instalações estaduais
2256
- Distrito Federal - http://mapa.cultura.df.gov.br/
2357
- Ceará - https://mapacultural.secult.ce.gov.br/
@@ -61,6 +95,23 @@ A plataforma já está em uso em diversos municipios, estados, no governo federa
6195
- Guarulhos - http://grucultura.guarulhos.sp.gov.br/
6296
- Itapetininga - http://mapacultural.itapetininga.sp.gov.br/
6397

98+
- Foz do Iguaçu - http://mapadaculturafoz.pmfi.pr.gov.br/
99+
- Maringa - http://maringacultura.maringa.pr.gov.br:38081/
100+
- Rio das Ostras - http://mapadacultura.riodasostras.rj.gov.br/
101+
- Laguna - http://laguna.sc.mapas.cultura.gov.br/
102+
- Novo Hamburgo - http://mapacultural.novohamburgo.rs.gov.br/
103+
- Rio Grande - http://mapacultural.riogrande.rs.gov.br/
104+
- São Paulo - http://spcultura.prefeitura.sp.gov.br/
105+
- Santo André - http://culturaz.santoandre.sp.gov.br/
106+
- São Caetano do Sul - http://mapacultural.saocaetanodosul.sp.gov.br/
107+
- Osasco - http://osasco.sp.mapas.cultura.gov.br/
108+
- Franco da Rocha - http://francodarocha.sp.mapas.cultura.gov.br/
109+
- Guaruja - http://mapadacultura.guaruja.sp.gov.br/
110+
- Varzea Paulista - http://janelacultural.varzeapaulista.sp.gov.br/
111+
- Itu - http://mapacultural.itu.sp.gov.br/
112+
- Guarulhos - http://grucultura.guarulhos.sp.gov.br/
113+
- Itapetininga - http://mapacultural.itapetininga.sp.gov.br/
114+
64115
## Sobre a aplicação
65116
Mapas Culturais é uma aplicação web server-side baseada em linguagem PHP e banco de dados Postgres, entre outras tecnologias e componentes, que propicia um ambiente virtual para mapeamento, divulgação e gestão de ativos culturais.
66117

compose/common/config.d/0.main.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
return [
4+
'app.siteName' => 'Mapa Cultural do Ceará',
5+
'app.siteDescription' => 'O Mapas Culturais é uma plataforma colaborativa que reúne informações sobre agentes, espaços, eventos, projetos culturais e oportunidades',
6+
7+
// Define o tema ativo no site principal. Deve ser informado o namespace do tema e neste deve existir uma classe Theme.
8+
'themes.active' => env('ACTIVE_THEME', 'Ceara'),
9+
10+
'app.lcode' => env('APP_LCODE', 'pt_BR'),
11+
12+
// Ids dos selos verificadores. Para utilizar múltiplos selos informe os ids separados por vírgula.
13+
'app.verifiedSealsIds' => '1',
14+
15+
];

compose/common/config.d/maps.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
return [
4+
'maps.center' => [
5+
-14.2400732, //latitude
6+
-53.1805018 // longitude
7+
],
8+
9+
'maps.zoom.default' => 5,
10+
'maps.zoom.approximate' => 14,
11+
'maps.zoom.precise' => 16,
12+
'maps.zoom.max' => 18,
13+
'maps.zoom.min' => 5,
14+
15+
'maps.tileServer' => '//{s}.tile.osm.org/{z}/{x}/{y}.png',
16+
];

compose/common/config.d/plugins.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
return [
4+
'plugins' => [
5+
'EvaluationMethodTechnical' => ['namespace' => 'EvaluationMethodTechnical', 'config' => ['step' => 0.5]],
6+
'EvaluationMethodSimple' => ['namespace' => 'EvaluationMethodSimple'],
7+
'EvaluationMethodDocumentary' => ['namespace' => 'EvaluationMethodDocumentary'],
8+
9+
'MultipleLocalAuth' => [ 'namespace' => 'MultipleLocalAuth' ],
10+
'SamplePlugin' => ['namespace' => 'SamplePlugin'],
11+
]
12+
];

compose/common/config.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
$config = include 'conf-base.php';
3+
4+
foreach(['conf-common.d', 'config.d'] as $folder){
5+
$config_files = glob(__DIR__ . "/{$folder}/*.php");
6+
7+
sort($config_files);
8+
9+
foreach($config_files as $config_file) {
10+
$config = array_merge($config, include ($config_file) );
11+
}
12+
}
13+
14+
15+
return $config;

0 commit comments

Comments
 (0)