mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-06-12 02:05:29 +00:00
Refactor installation instructions
(cherry picked from commit 2eb4589b0176b7377135c4539531abde7d0a88b4)
This commit is contained in:
58
docs/start/development.md
Normal file
58
docs/start/development.md
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Development Server
|
||||
---
|
||||
|
||||
## Development Server
|
||||
|
||||
!!! warning "Installation"
|
||||
Before continuing, ensure that the [installation steps](../install) have been completed.
|
||||
|
||||
The following installation instructions can be used to launch a simple development server.
|
||||
|
||||
!!! warning "Deployment"
|
||||
Refer to the [deployment instructions](../deploy) to implement a much more robust server setup.
|
||||
|
||||
### Running on a Local Machine
|
||||
|
||||
To run the development server on a local machine, run the command:
|
||||
|
||||
```
|
||||
(env) inv server
|
||||
```
|
||||
|
||||
This will launch the InvenTree web interface at `http://127.0.0.1:8000`.
|
||||
|
||||
A different port can be specified using the `-a` flag:
|
||||
|
||||
```
|
||||
(env) inv server -a 127.0.0.1:8123
|
||||
```
|
||||
|
||||
Serving on the address `127.0.0.1` means that InvenTree will only be available *on that computer*. The server will be accessible from a web browser on the same computer, but not from any other computers on the local network.
|
||||
|
||||
### Running on a Local Network
|
||||
|
||||
To enable access to the InvenTree server from other computers on a local network, you need to know the IP of the computer running the server. For example, if the server IP address is `192.168.120.1`:
|
||||
|
||||
```
|
||||
(env) inv server -a 192.168.120.1:8000
|
||||
```
|
||||
|
||||
## Background Worker
|
||||
|
||||
The backgroun task manager must also be started. The InvenTree server is already running in the foreground, so open a *new shell window* to start the server.
|
||||
|
||||
### Activate Virtual Environment
|
||||
|
||||
```
|
||||
cd /home/inventree
|
||||
source ./env/bin/activate
|
||||
```
|
||||
|
||||
### Start Background Worker
|
||||
|
||||
```
|
||||
(env) invoke worker
|
||||
```
|
||||
|
||||
This will start the background process manager in the current shell.
|
Reference in New Issue
Block a user