mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-29 20:30:39 +00:00
Devcontainer tweaks (#10658)
* Expose port 8000 for InvenTree server container * Expose dev server on all interfaces
This commit is contained in:
@@ -18,6 +18,8 @@ services:
|
|||||||
- 6379
|
- 6379
|
||||||
|
|
||||||
inventree:
|
inventree:
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: .devcontainer/Dockerfile
|
dockerfile: .devcontainer/Dockerfile
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export default defineConfig({
|
|||||||
timeout: 120 * 1000
|
timeout: 120 * 1000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: 'invoke dev.server',
|
command: 'invoke dev.server -a 0.0.0.0:8000',
|
||||||
env: {
|
env: {
|
||||||
INVENTREE_DEBUG: 'True',
|
INVENTREE_DEBUG: 'True',
|
||||||
INVENTREE_LOG_LEVEL: 'WARNING',
|
INVENTREE_LOG_LEVEL: 'WARNING',
|
||||||
|
|||||||
7
tasks.py
7
tasks.py
@@ -1169,15 +1169,16 @@ def gunicorn(c, address='0.0.0.0:8000', workers=None):
|
|||||||
@task(
|
@task(
|
||||||
pre=[wait],
|
pre=[wait],
|
||||||
help={
|
help={
|
||||||
'address': 'Server address:port (default=127.0.0.1:8000)',
|
'address': 'Server address:port (default=0.0.0.0:8000)',
|
||||||
'no_reload': 'Do not automatically reload the server in response to code changes',
|
'no_reload': 'Do not automatically reload the server in response to code changes',
|
||||||
'no_threading': 'Disable multi-threading for the development server',
|
'no_threading': 'Disable multi-threading for the development server',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
def server(c, address='127.0.0.1:8000', no_reload=False, no_threading=False):
|
def server(c, address='0.0.0.0:8000', no_reload=False, no_threading=False):
|
||||||
"""Launch a (development) server using Django's in-built webserver.
|
"""Launch a (development) server using Django's in-built webserver.
|
||||||
|
|
||||||
Note: This is *not* sufficient for a production installation.
|
- This is *not* sufficient for a production installation.
|
||||||
|
- The default address exposes the server on all network interfaces.
|
||||||
"""
|
"""
|
||||||
cmd = f'runserver {address}'
|
cmd = f'runserver {address}'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user