Update symfony containers #46

Open
vcarroy wants to merge 3 commits from symfony-container-update into develop
3 changed files with 14 additions and 4 deletions
Showing only changes of commit 5a59383cdd - Show all commits

View File

@ -13,3 +13,5 @@
!/package.json !/package.json
!/symfony.lock !/symfony.lock
!/webpack.config.js !/webpack.config.js
/public/build

View File

@ -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

View File

@ -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/app/')
// 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/app')
// only needed for CDN's or sub-directory deploy // only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/') .setManifestKeyPrefix('build/app')
/* /*
* ENTRY CONFIG * ENTRY CONFIG
@ -74,7 +76,10 @@ Encore
// directory where compiled assets will be stored // directory where compiled assets will be stored
.setOutputPath('public/build/theme/') .setOutputPath('public/build/theme/')
// 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/theme') .setPublicPath(basePath + '/build/theme')
// only needed for CDN's or sub-directory deploy
.setManifestKeyPrefix('build/theme')
.addEntry('theme','./public/theme-entrypoint.js') .addEntry('theme','./public/theme-entrypoint.js')
.splitEntryChunks() .splitEntryChunks()