mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 23:29:39 +00:00
reset Python venv if RESET_VENV is set
This commit is contained in:
parent
23e5286267
commit
67fd85b175
@ -44,6 +44,7 @@ The following environment variables are available when using Docker Compose:
|
|||||||
| `BACKEND_PORT` | 6868 |
|
| `BACKEND_PORT` | 6868 |
|
||||||
| `BACKEND_PASSWORD` | *[None]* |
|
| `BACKEND_PASSWORD` | *[None]* |
|
||||||
| `BACKEND_LOG_LEVEL` | debug |
|
| `BACKEND_LOG_LEVEL` | debug |
|
||||||
|
| `RESET_VENV` | *[None]* |
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
@ -57,6 +58,12 @@ Start the web UI with the log level set to debug:
|
|||||||
WEB_LOG_LEVEL=debug docker compose up
|
WEB_LOG_LEVEL=debug docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Force resetting & reinstalling Python web `venv` directory:
|
||||||
|
|
||||||
|
```
|
||||||
|
RESET_VENV=1 docker compose up
|
||||||
|
```
|
||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
When using Docker Compose the following volumes will be mounted automatically:
|
When using Docker Compose the following volumes will be mounted automatically:
|
||||||
|
@ -36,6 +36,7 @@ services:
|
|||||||
- "127.0.0.1:${WEB_HTTPS_PORT:-8443}:443"
|
- "127.0.0.1:${WEB_HTTPS_PORT:-8443}:443"
|
||||||
environment:
|
environment:
|
||||||
- BACKEND_PASSWORD=${BACKEND_PASSWORD:-}
|
- BACKEND_PASSWORD=${BACKEND_PASSWORD:-}
|
||||||
|
- RESET_VENV=${RESET_VENV:-}
|
||||||
init: true
|
init: true
|
||||||
command: [
|
command: [
|
||||||
"--backend-host=${BACKEND_HOST:-backend}",
|
"--backend-host=${BACKEND_HOST:-backend}",
|
||||||
|
@ -36,6 +36,12 @@ if [ $ERROR = 1 ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Force rebuild the venv if RESET_VENV is set to any non-empty value
|
||||||
|
if [[ "$RESET_VENV" ]]; then
|
||||||
|
echo "Force-removing old venv"
|
||||||
|
sudo rm -rf venv
|
||||||
|
fi
|
||||||
|
|
||||||
# Test for two known broken venv states
|
# Test for two known broken venv states
|
||||||
if test -e venv; then
|
if test -e venv; then
|
||||||
GOOD_VENV=true
|
GOOD_VENV=true
|
||||||
|
Loading…
Reference in New Issue
Block a user