Skip to content

Commit

Permalink
Merge pull request #83 from Thorfusion/dev
Browse files Browse the repository at this point in the history
Update to 1.4.3
  • Loading branch information
maggi373 authored Aug 25, 2024
2 parents cfe1f73 + 07451e7 commit 759a304
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,24 @@ solder.py will run everything except api part of solder, quite rare usecase.
-e MANAGEMENT_ONLY=True
```

#### Example

```bash
docker run -d \
--name solderpy \
-e DB_HOST=192.168.1.1 \
-e DB_PORT=3306 \
-e DB_USER=solderpy \
-e DB_PASSWORD=solderpy \
-e DB_DATABASE=solderpy \
-e SOLDER_MIRROR_URL=https://example.com/mods/ \
-e SOLDER_REPO_LOCATION=http://localhost/mods/ \
-p 80:5000 \
-v /solderpy/mods:/app/mods \
--restart unless-stopped \
thorfusion/solderpy:latest
```

NOTE: The docker image does not and will not support https, therefore it is required to run an reverse proxy

### docker container installed, setup on website
Expand Down
19 changes: 13 additions & 6 deletions models/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@
from dotenv import load_dotenv

## Solderpy version
solderpy_version = "1.4.2"
solderpy_version = "1.4.3"

load_dotenv(".env")

## Enviroment variables
new_user = False
migratetechnic = False
api_only = False
management_only = False
debug = False

host = os.getenv("APP_URL")
port = os.getenv("APP_PORT")

new_user = os.getenv("NEW_USER")
migratetechnic = os.getenv("TECHNIC_MIGRATION")
if os.getenv("NEW_USER"):
new_user = os.getenv("NEW_USER").lower() in ["true", "t", "1", "yes", "y"]
if os.getenv("TECHNIC_MIGRATION"):
migratetechnic = os.getenv("TECHNIC_MIGRATION").lower() in ["true", "t", "1", "yes", "y"]

api_only = os.getenv("API_ONLY")
management_only = os.getenv("MANAGEMENT_ONLY")
if os.getenv("API_ONLY"):
api_only = os.getenv("API_ONLY").lower() in ["true", "t", "1", "yes", "y"]
if os.getenv("MANAGEMENT_ONLY"):
management_only = os.getenv("MANAGEMENT_ONLY").lower() in ["true", "t", "1", "yes", "y"]

debug = os.getenv("APP_DEBUG").lower() in ["true", "t", "1", "yes", "y"]
if os.getenv("APP_DEBUG"):
debug = os.getenv("APP_DEBUG").lower() in ["true", "t", "1", "yes", "y"]

mirror_url = os.getenv("SOLDER_MIRROR_URL")
repo_url = os.getenv("SOLDER_REPO_LOCATION")
Expand Down

0 comments on commit 759a304

Please sign in to comment.