Skip to content

Commit

Permalink
Diminui tempo do build e Atuliaza dependências
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola committed Jul 4, 2024
1 parent c586cdd commit 24625fc
Show file tree
Hide file tree
Showing 5 changed files with 6,756 additions and 8,196 deletions.
99 changes: 24 additions & 75 deletions api/.env
Original file line number Diff line number Diff line change
@@ -1,76 +1,25 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration

# API Platform distribution
TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
TRUSTED_HOSTS=^(localhost|php)$

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=!ChangeMe!
###< symfony/framework-bundle ###

POSTGRES_DB=mapas,gis
POSTGRES_USER=mapas
POSTGRES_PASSWORD=mapas

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# # ="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
# DATABASE_URL="postgresql://app:!ChangeMe!@database:5432/app?serverVersion=16&charset=utf8"
###< doctrine/doctrine-bundle ###

###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###

###> symfony/mercure-bundle ###
# See https://symfony.com/doc/current/mercure.html#configuration
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
MERCURE_URL=http://php/.well-known/mercure
# The public URL of the Mercure hub, used by the browser to connect
BUILD_ASSETS=0
DATABASE_URL=postgresql://mapas:mapas@database:5432/mapas?serverVersion=14&charset=utf8
DATADIR=/opt/postgres/data
GOOGLE_RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
GOOGLE_RECAPTCHA_SITEKEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
JOBS_INTERVAL=5
MAILER_FROM=sysadmin@localhost
MAILER_TRANSPORT=smtp://mailhog:1025
MC_UPDATES_PROCESSES=1
MERCURE_JWT_SECRET=!ChangeThisMercureHubJWTSecretKey!
MERCURE_PUBLIC_URL=https://localhost/.well-known/mercure
# The secret used to sign the JWTs
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
###< symfony/mercure-bundle ###

###> symfony/mailer ###
# MAILER_DSN=null://null
MAILER_DSN=smtp://mailhog:1025
###< symfony/mailer ###

###> symfony/amazon-mailer ###
# MAILER_DSN=ses://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1
# MAILER_DSN=ses+smtp://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1
###< symfony/amazon-mailer ###

###> symfony/mailchimp-mailer ###
# MAILER_DSN=mandrill://KEY@default
# MAILER_DSN=mandrill+smtp://USERNAME:PASSWORD@default
###< symfony/mailchimp-mailer ###

###> symfony/mailgun-mailer ###
# MAILER_DSN=mailgun://KEY:DOMAIN@default?region=us
# MAILER_DSN=mailgun+smtp://USERNAME:PASSWORD@default?region=us
###< symfony/mailgun-mailer ###

###> symfony/sendgrid-mailer ###
# MAILER_DSN=sendgrid://KEY@default
###< symfony/sendgrid-mailer ###
MERCURE_PUBLISHER_JWT_KEY=!ChangeThisMercureHubJWTSecretKey!
MERCURE_SUBSCRIBER_JWT_KEY=!ChangeThisMercureHubJWTSecretKey!
MERCURE_URL=http://php/.well-known/mercure
NUM_PROCESSES=1
PENDING_PCACHE_RECREATION_INTERVAL=5
POSTGRES_DB=mapas
POSTGRES_PASSWORD=mapas
POSTGRES_USER=mapas
PWA_UPSTREAM=pwa:3000
REDIS_CACHE=
SERVER_NAME=http://
SESSIONS_SAVE_PATH=
TRUSTED_HOSTS=^${SERVER_NAME:-example\.com|localhost}|php$$
TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
10 changes: 1 addition & 9 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,12 @@ ENV COMPOSER_ALLOW_SUPERUSER=1
RUN set -eux; \
install-php-extensions \
@composer \
apcu \
intl \
opcache \
pdo_pgsql \
zip \
gd \
;

###> recipes ###
###> doctrine/doctrine-bundle ###
RUN set -eux; \
install-php-extensions pdo_pgsql
###< doctrine/doctrine-bundle ###
###< recipes ###

COPY --link frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/
COPY --link --chmod=755 frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY --link frankenphp/Caddyfile /etc/caddy/Caddyfile
Expand Down
15 changes: 4 additions & 11 deletions api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"acelaya/doctrine-enum-type": "^2.3",
"akrabat/ip-address-middleware": "^2.1",
"doctrine/annotations": "^2.0",
"doctrine/dbal": "^3.6",
"doctrine/orm": "2.16.*",
"doctrine/dbal": "^3",
"doctrine/orm": "^2",
"firebase/php-jwt": "^6.4",
"michelf/php-markdown": "1.*",
"monolog/monolog": "^3.4",
Expand Down Expand Up @@ -80,9 +80,8 @@
},
"autoload": {
"psr-4": {
"App\\": "mapas/app/src/",
"App\\": "src/",
"MapasCulturais\\": "mapas/src/core",
"MapasCulturais\\Modules\\": "mapas/src/modules",
"MapasCulturais\\Themes\\": "mapas/src/themes",
"MultipleLocalAuth\\": "mapas/src/plugins/plugin-MultipleLocalAuth"
}
Expand Down Expand Up @@ -134,13 +133,7 @@
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
}
},
"conflict": {
"symfony/symfony": "*"
Expand Down
Loading

0 comments on commit 24625fc

Please sign in to comment.