forked from mapasculturais/mapasculturais
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuração para realizar testes usando Docker
- Loading branch information
1 parent
070da87
commit 3c190b0
Showing
7 changed files
with
90 additions
and
8 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 |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#!/bin/bash | ||
set -e | ||
set -u | ||
echo "Executando config_db.sh..." | ||
|
||
#psql -c "CREATE USER mapas" | ||
#createdb --owner mapas mapas | ||
#psql -d mapas -c "CREATE EXTENSION postgis;" | ||
|
||
echo "Executando config for database $POSTGRES_DB:" | ||
psql -U mapas -d mapas -c "CREATE EXTENSION unaccent;" | ||
psql -U mapas -f /srv/mapas/db/schema.sql | ||
psql -U mapas -f /srv/mapas/db/initial-data.sql | ||
|
||
echo "Executando config for database $POSTGRES_DB_TEST:" | ||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL | ||
DROP DATABASE IF EXISTS $POSTGRES_DB_TEST; | ||
CREATE DATABASE $POSTGRES_DB_TEST; | ||
GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_DB_TEST TO $POSTGRES_USER; | ||
EOSQL | ||
psql -U $POSTGRES_USER -d $POSTGRES_DB_TEST -f /srv/mapas/db/db-test.sql |
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
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,48 @@ | ||
<?php | ||
use \Slim\Log; | ||
|
||
$config = include 'conf-base.php'; | ||
return array_merge($config, | ||
array( | ||
'base.url' => 'http://localhost:8888/', | ||
'site.url' => 'http://localhost:8888/', | ||
'app.log.translations' => false, | ||
'slim.log.level' => Log::DEBUG, | ||
'slim.log.enabled' => true, | ||
// 'app.log.query' => true, | ||
'slim.debug' => true, | ||
'auth.provider' => 'Test', | ||
|
||
'auth.config' => array( | ||
'filename' => '/tmp/mapasculturais-tests-authenticated-user.id' | ||
), | ||
|
||
// 'app.log.query' => true, | ||
'doctrine.isDev' => true, | ||
|
||
'doctrine.database' => array( | ||
'dbname' => 'mapasculturais_test', | ||
'user' => 'mapas', | ||
'password' => 'senhaMapas', | ||
'host' => 'db', | ||
|
||
), | ||
|
||
'userIds' => array( | ||
'superAdmin' => array(1,2), | ||
// 'admin' => 2, | ||
// 'staff' => 3, | ||
// 'normal' => 4, | ||
|
||
'admin' => array(3,4), | ||
'staff' => array(5,6), | ||
'normal' => array(7,8), | ||
), | ||
|
||
// disable cache | ||
|
||
'app.usePermissionsCache' => false, | ||
'app.chace' => new \Doctrine\Common\Cache\ArrayCache() | ||
// 'app.cache' => function_exists('apc_store') ? new \Doctrine\Common\Cache\ApcCache() : new \Doctrine\Common\Cache\ArrayCache(), | ||
) | ||
); |
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