Compare commits
3 Commits
develop
...
symfony-co
Author | SHA1 | Date |
---|---|---|
Valentin Carroy | 6a815be853 | |
Valentin Carroy | 5a59383cdd | |
Valentin Carroy | 05ad2642ea |
|
@ -1,14 +1,17 @@
|
||||||
.env.local
|
*
|
||||||
.env.local.php
|
!/assets
|
||||||
.env.*.local
|
!/bin
|
||||||
config/secrets/prod/prod.decrypt.private.php
|
!/config
|
||||||
public/bundles/
|
!/public
|
||||||
var/
|
!/src
|
||||||
vendor/
|
!/templates
|
||||||
supervisord.log
|
!/translations
|
||||||
supervisord.pid
|
!/.env
|
||||||
.composer/
|
!/composer.json
|
||||||
.vscode
|
!/composer.lock
|
||||||
composer.phar
|
!/package-lock.json
|
||||||
/tools
|
!/package.json
|
||||||
/.trivy
|
!/symfony.lock
|
||||||
|
!/webpack.config.js
|
||||||
|
|
||||||
|
/public/build
|
2
.env
2
.env
|
@ -14,7 +14,7 @@
|
||||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
###> symfony/framework-bundle ###
|
||||||
APP_ENV=dev
|
APP_ENV=prod
|
||||||
APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef
|
APP_SECRET=406ccaa0c76a451fdcc2307ea146cbef
|
||||||
URL_LINK="http://localhost"
|
URL_LINK="http://localhost"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,9 @@ parameters:
|
||||||
base_url: '%env(BASE_URL)%'
|
base_url: '%env(BASE_URL)%'
|
||||||
env(BASE_URL): '//'
|
env(BASE_URL): '//'
|
||||||
|
|
||||||
|
base_path: '%env(BASE_PATH)%'
|
||||||
|
env(BASE_PATH): '/'
|
||||||
|
|
||||||
cookie_path: '%env(COOKIE_PATH)%'
|
cookie_path: '%env(COOKIE_PATH)%'
|
||||||
env(COOKIE_PATH): '/'
|
env(COOKIE_PATH): '/'
|
||||||
framework:
|
framework:
|
||||||
|
@ -18,7 +21,7 @@ framework:
|
||||||
storage_factory_id: session.storage.factory.native
|
storage_factory_id: session.storage.factory.native
|
||||||
cookie_path: "%cookie_path%"
|
cookie_path: "%cookie_path%"
|
||||||
assets:
|
assets:
|
||||||
base_urls: '%base_url%'
|
base_path: '%base_path%'
|
||||||
router:
|
router:
|
||||||
default_uri: '%base_url%'
|
default_uri: '%base_url%'
|
||||||
#esi: true
|
#esi: true
|
||||||
|
|
|
@ -2,53 +2,10 @@ webpack_encore:
|
||||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
||||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||||
# output_path: false
|
# output_path: false
|
||||||
output_path: false
|
output_path: "%kernel.project_dir%/public/build"
|
||||||
builds:
|
|
||||||
appConfig: '%kernel.project_dir%/public/build/app'
|
|
||||||
themeConfig: '%kernel.project_dir%/public/build/theme'
|
|
||||||
# Set attributes that will be rendered on all script and link tags
|
# Set attributes that will be rendered on all script and link tags
|
||||||
script_attributes:
|
script_attributes:
|
||||||
defer: true
|
defer: true
|
||||||
# Uncomment (also under link_attributes) if using Turbo Drive
|
# Uncomment (also under link_attributes) if using Turbo Drive
|
||||||
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
||||||
# 'data-turbo-track': reload
|
# 'data-turbo-track': reload
|
||||||
# link_attributes:
|
|
||||||
# Uncomment if using Turbo Drive
|
|
||||||
# 'data-turbo-track': reload
|
|
||||||
|
|
||||||
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
|
||||||
# crossorigin: 'anonymous'
|
|
||||||
|
|
||||||
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
|
|
||||||
# preload: true
|
|
||||||
|
|
||||||
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
|
|
||||||
# strict_mode: false
|
|
||||||
|
|
||||||
# If you have multiple builds:
|
|
||||||
# builds:
|
|
||||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
|
||||||
|
|
||||||
# pass the build name as the 3rd argument to the Twig functions
|
|
||||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
|
||||||
|
|
||||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
|
||||||
# Put in config/packages/prod/webpack_encore.yaml
|
|
||||||
# cache: true
|
|
||||||
|
|
||||||
framework:
|
|
||||||
assets:
|
|
||||||
packages:
|
|
||||||
app:
|
|
||||||
json_manifest_path: '%kernel.project_dir%/public/build/app/manifest.json'
|
|
||||||
theme:
|
|
||||||
json_manifest_path: '%kernel.project_dir%/public/build/theme/manifest.json'
|
|
||||||
#when@prod:
|
|
||||||
# webpack_encore:
|
|
||||||
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
|
||||||
# # Available in version 1.2
|
|
||||||
# cache: true
|
|
||||||
|
|
||||||
#when@test:
|
|
||||||
# webpack_encore:
|
|
||||||
# strict_mode: false
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ARG NODE_OPTIONS="--openssl-legacy-provider"
|
ARG NODE_OPTIONS="--openssl-legacy-provider" \
|
||||||
ARG PHP_PKG_VERSION="8.1.22-r0"
|
PHP_PKG_VERSION="8.1.22-r0" \
|
||||||
ARG ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
||||||
build-base=0.5-r3 \
|
build-base=0.5-r3 \
|
||||||
php81-gd=${PHP_PKG_VERSION} \
|
php81-gd=${PHP_PKG_VERSION} \
|
||||||
php81-xsl=${PHP_PKG_VERSION} \
|
php81-xsl=${PHP_PKG_VERSION} \
|
||||||
|
@ -14,4 +14,3 @@ ARG ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
||||||
php81-pecl-xdebug"
|
php81-pecl-xdebug"
|
||||||
|
|
||||||
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-base-2024.10.4-stable.1529.b630c69
|
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-base-2024.10.4-stable.1529.b630c69
|
||||||
RUN chown 1000:www-data -R /app
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ARG NODE_OPTIONS="--openssl-legacy-provider"
|
ARG NODE_OPTIONS="--openssl-legacy-provider" \
|
||||||
ARG PHP_PKG_VERSION="8.1.22-r0"
|
PHP_PKG_VERSION="8.1.22-r0" \
|
||||||
ARG ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
||||||
build-base=0.5-r3 \
|
build-base=0.5-r3 \
|
||||||
php81-gd=${PHP_PKG_VERSION} \
|
php81-gd=${PHP_PKG_VERSION} \
|
||||||
php81-xsl=${PHP_PKG_VERSION} \
|
php81-xsl=${PHP_PKG_VERSION} \
|
||||||
|
@ -14,5 +14,4 @@ ARG ADDITIONAL_PACKAGES="bash=5.2.15-r0 \
|
||||||
php81-pecl-xdebug"
|
php81-pecl-xdebug"
|
||||||
|
|
||||||
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-standalone-2024.10.4-stable.1529.b630c69
|
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-standalone-2024.10.4-stable.1529.b630c69
|
||||||
RUN chown 1000:www-data -R /app
|
|
||||||
USER www-data
|
USER www-data
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -103,6 +103,6 @@ class SQLLoginRequest
|
||||||
{
|
{
|
||||||
$fields = join(',', array_merge($this->getPasswordFields(), $this->getDataFields()));
|
$fields = join(',', array_merge($this->getPasswordFields(), $this->getDataFields()));
|
||||||
|
|
||||||
return 'SELECT '.$fields.' FROM '.$this->getTableName().' WHERE LOWER('.$this->getLoginColumnName().') = LOWER(:'.$this->getLoginColumnName().');';
|
return 'SELECT '.$fields.' FROM '.$this->getTableName().' WHERE '.$this->getLoginColumnName().' = :'.$this->getLoginColumnName().';';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,18 +4,18 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{{ encore_entry_link_tags('app', null, 'appConfig') }}
|
{{ encore_entry_link_tags('app') }}
|
||||||
{{ encore_entry_link_tags('bootstrap-css', null, 'appConfig') }}
|
{{ encore_entry_link_tags('bootstrap-css') }}
|
||||||
{{ encore_entry_link_tags('theme', null, 'themeConfig') }}
|
{{ encore_entry_link_tags('theme') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{{ encore_entry_script_tags('app', null, 'appConfig') }}
|
{{ encore_entry_script_tags('app') }}
|
||||||
{{ encore_entry_script_tags('bootstrap-js', null, 'appConfig') }}
|
{{ encore_entry_script_tags('bootstrap-js') }}
|
||||||
{{ encore_entry_script_tags('theme', null, 'themeConfig') }}
|
{{ encore_entry_script_tags('theme') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -6,14 +6,16 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const basePath = process.env.BASE_PATH || ''
|
||||||
|
|
||||||
// Definition de AppConfig
|
// Definition de AppConfig
|
||||||
Encore
|
Encore
|
||||||
// directory where compiled assets will be stored
|
// directory where compiled assets will be stored
|
||||||
.setOutputPath('public/build/app/')
|
.setOutputPath('public/build/')
|
||||||
// public path used by the web server to access the output path
|
// public path used by the web server to access the output path
|
||||||
.setPublicPath('/build/app')
|
.setPublicPath(basePath + '/build/')
|
||||||
// only needed for CDN's or sub-directory deploy
|
// only needed for CDN's or sub-directory deploy
|
||||||
//.setManifestKeyPrefix('build/')
|
.setManifestKeyPrefix('build')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ENTRY CONFIG
|
* ENTRY CONFIG
|
||||||
|
@ -24,6 +26,7 @@ Encore
|
||||||
.addEntry('app', './assets/app.js')
|
.addEntry('app', './assets/app.js')
|
||||||
.addEntry('bootstrap-css', './assets/styles/bootstrap.scss')
|
.addEntry('bootstrap-css', './assets/styles/bootstrap.scss')
|
||||||
.addEntry('bootstrap-js', './assets/app-bootstrap.js')
|
.addEntry('bootstrap-js', './assets/app-bootstrap.js')
|
||||||
|
.addEntry('theme','./public/theme-entrypoint.js')
|
||||||
|
|
||||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
|
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
|
||||||
.enableStimulusBridge('./assets/controllers.json')
|
.enableStimulusBridge('./assets/controllers.json')
|
||||||
|
@ -49,7 +52,7 @@ Encore
|
||||||
.enableVersioning(!Encore.isProduction())
|
.enableVersioning(!Encore.isProduction())
|
||||||
|
|
||||||
.configureBabel((config) => {
|
.configureBabel((config) => {
|
||||||
config.plugins.push('@babel/plugin-proposal-class-properties');
|
config.plugins.push('@babel/plugin-transform-class-properties');
|
||||||
})
|
})
|
||||||
|
|
||||||
// enables @babel/preset-env polyfills
|
// enables @babel/preset-env polyfills
|
||||||
|
@ -60,37 +63,6 @@ Encore
|
||||||
.enablePostCssLoader()
|
.enablePostCssLoader()
|
||||||
.autoProvidejQuery()
|
.autoProvidejQuery()
|
||||||
.enableSassLoader()
|
.enableSassLoader()
|
||||||
// build the first configuration
|
|
||||||
const appConfig = Encore.getWebpackConfig();
|
|
||||||
|
|
||||||
// Set a unique name for the config (needed later!)
|
|
||||||
appConfig.name = 'appConfig';
|
|
||||||
|
|
||||||
// reset Encore to build the second config
|
|
||||||
Encore.reset();
|
|
||||||
|
|
||||||
// Definition de themeConfig
|
|
||||||
Encore
|
|
||||||
// directory where compiled assets will be stored
|
|
||||||
.setOutputPath('public/build/theme/')
|
|
||||||
// public path used by the web server to access the output path
|
|
||||||
.setPublicPath('/build/theme')
|
|
||||||
.addEntry('theme','./public/theme-entrypoint.js')
|
|
||||||
|
|
||||||
.splitEntryChunks()
|
|
||||||
.enableSingleRuntimeChunk()
|
|
||||||
.enableBuildNotifications()
|
|
||||||
.enableSourceMaps(false)
|
|
||||||
.enableVersioning(false)
|
|
||||||
.enablePostCssLoader()
|
|
||||||
|
|
||||||
;
|
;
|
||||||
// build the second configuration
|
module.exports = Encore.getWebpackConfig();
|
||||||
const themeConfig = Encore.getWebpackConfig();
|
|
||||||
|
|
||||||
// Set a unique name for the config (needed later!)
|
|
||||||
themeConfig.name = 'themeConfig';
|
|
||||||
|
|
||||||
;
|
|
||||||
// export the final configuration as an array of multiple configurations
|
|
||||||
module.exports = [appConfig, themeConfig];
|
|
||||||
|
|
Loading…
Reference in New Issue