mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 03:24:01 +03:00
Fix open
option for initBrowserSync
when using Docker (#3519)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
parent
4745805fd4
commit
9a46369062
|
@ -139,14 +139,16 @@ function initBrowserSync() {
|
||||||
`${paths.js}/*.js`,
|
`${paths.js}/*.js`,
|
||||||
`${paths.templates}/*.html`
|
`${paths.templates}/*.html`
|
||||||
], {
|
], {
|
||||||
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
|
// https://www.browsersync.io/docs/options/#option-open
|
||||||
|
// Disable as it doesn't work from inside a container
|
||||||
|
open: false,
|
||||||
|
{%- endif %}
|
||||||
// https://www.browsersync.io/docs/options/#option-proxy
|
// https://www.browsersync.io/docs/options/#option-proxy
|
||||||
proxy: {
|
proxy: {
|
||||||
{%- if cookiecutter.use_docker == 'n' %}
|
{%- if cookiecutter.use_docker == 'n' %}
|
||||||
target: '127.0.0.1:8000',
|
target: '127.0.0.1:8000',
|
||||||
{%- else %}
|
{%- else %}
|
||||||
// https://www.browsersync.io/docs/options/#option-open
|
|
||||||
// Disable as it doesn't work from inside a container
|
|
||||||
open: false,
|
|
||||||
target: 'django:8000',
|
target: 'django:8000',
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
proxyReq: [
|
proxyReq: [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user