mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-07 21:21:30 +08:00
docs: add running in background section to Docker guide
This commit is contained in:
parent
4e656d3a91
commit
6a83feecd6
@ -20,6 +20,30 @@ Mount your application directory and run:
|
|||||||
docker run -p 8000:8000 -v $(pwd):/app ghcr.io/benoitc/gunicorn app:app
|
docker run -p 8000:8000 -v $(pwd):/app ghcr.io/benoitc/gunicorn app:app
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Running in Background
|
||||||
|
|
||||||
|
Use `-d` (detached mode) to run the container in the background:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Start in background
|
||||||
|
docker run -d --name myapp -p 8000:8000 -v $(pwd):/app ghcr.io/benoitc/gunicorn app:app
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
docker logs myapp
|
||||||
|
|
||||||
|
# Follow logs in real-time
|
||||||
|
docker logs -f myapp
|
||||||
|
|
||||||
|
# Stop the container
|
||||||
|
docker stop myapp
|
||||||
|
|
||||||
|
# Start it again
|
||||||
|
docker start myapp
|
||||||
|
|
||||||
|
# Remove the container
|
||||||
|
docker rm myapp
|
||||||
|
```
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user