5 Commits

Author SHA1 Message Date
theis.gaedigk 8ebdbc14d6 edited docs 2026-06-09 18:56:32 +02:00
theis.gaedigk 1928068499 removed sh script 2026-06-08 19:46:50 +02:00
theis.gaedigk ea18228299 edited README 2026-06-06 17:19:49 +02:00
theis.gaedigk 6aa00da60b updated README 2026-06-06 17:13:59 +02:00
theis.gaedigk 0315aa4a40 Added gh templates 2026-06-06 16:58:04 +02:00
8 changed files with 122 additions and 39 deletions
+52
View File
@@ -0,0 +1,52 @@
---
name: Bug Report
about: Report something that isn't working correctly in Stockhome
title: "[BUG] "
labels: bug
assignees: ""
---
## 🐛 Bug Description
<!-- A clear and concise description of what the bug is. -->
## Steps to Reproduce
<!-- How can we reliably reproduce the issue? -->
1. Go to '...'
2. Click on '...'
3. See error
## Expected Behavior
<!-- What did you expect to happen? -->
## Actual Behavior
<!-- What actually happened instead? -->
## Screenshots / Logs
<!-- If applicable, add screenshots or paste relevant logs (e.g. from `docker compose logs`). -->
## Environment
| Field | Value |
|--------------------|-------------------------------|
| Stockhome version | <!-- e.g. v1.0.0 or commit hash --> |
| Deployment | <!-- Docker / docker-compose / manual --> |
| Browser | <!-- e.g. Chrome 125, Firefox 126 --> |
| OS (host) | <!-- e.g. Ubuntu 24.04, Raspberry Pi OS --> |
| `BACKEND_HOST` | <!-- localhost / IP / domain --> |
## Docker Logs
<!-- Run `docker compose logs` and paste any relevant output here. -->
<details>
<summary>docker compose logs</summary>
```
paste logs here
```
</details>
## Additional Context
<!-- Anything else that might help us understand the issue. -->
+41
View File
@@ -0,0 +1,41 @@
---
name: Feature Request
about: Suggest a new feature or improvement for Stockhome
title: "[FEATURE] "
labels: enhancement
assignees: ""
---
## 💡 Feature Description
<!-- A clear and concise description of the feature you'd like to see. -->
## Problem / Motivation
<!-- Is your feature request related to a problem? Describe it.
e.g. "I always have to manually check expiry dates because..." -->
## Proposed Solution
<!-- Describe how you imagine this feature working. Be as specific as you like. -->
## Alternatives Considered
<!-- Have you thought of other approaches or workarounds? Why are they not ideal? -->
## Affected Area
<!-- Which part of Stockhome does this relate to? Check all that apply. -->
- [ ] Inventory / Product management
- [ ] Storage locations
- [ ] Expiry / Bottling date tracking
- [ ] QR code generation / scanning
- [ ] Costs tracking
- [ ] Settings (app name, currency, …)
- [ ] Authentication / User management
- [ ] API / Backend
- [ ] Frontend / UI
- [ ] Docker / Deployment
- [ ] Other: <!-- describe -->
## Additional Context / Mockups
<!-- Add any other context, screenshots, or mockups that help illustrate the idea. -->
+28 -14
View File
@@ -43,19 +43,19 @@ exit
### 2. Clone repository
If you haven't installed git, download the source code from this repository from the release page and unpack the `.zip` file.
**_Recommended because it is easy to update_**
**OR**
**_Recommended because it is easier to update then:_**
If you want to be always up to date, you can clone this repository by running:
Clone this repository by running:
```shell
git clone https://git.the1s.de/theis.gaedigk/stockhome.git
git clone --branch v0.1 --single-branch https://github.com/theis-js/stockhome.git
```
> **NOTE:** To do this, you must have git installed. [How to install git?](https://git-scm.com/install/)
You can replace `v0.1` with the latest release tag to get the latest version of the stack. You can also use `dev` to get the latest development version, but keep in mind that it may contain bugs and errors.
View the available version tags here: [Releases](https://github.com/theis-js/stockhome/tags)
> **Note** To do this, you must have git installed. [How to install git?](https://git-scm.com/install/)
### 3. Create `.env` file
@@ -69,7 +69,7 @@ BACKEND_HOST=localhost
Make sure that you have set an secure root password and a secure signature.
> **NOTE:** These three values cannot contain special characters.
> **Note** These three values cannot contain special characters.
The `BACKEND_HOST` can be set to the IP address of your server or to `localhost` if you are running the app on your local machine.
@@ -96,16 +96,30 @@ Password: admin
_Keep in mind that you should change the password later in the settings page._
> **NOTE:** If errors occur get yourself some help in the [error code page](./.github/docs/error/README.md).
> **Note** If errors occur get yourself some help in the [error code page](./.github/docs/error/README.md).
> _I'd be grateful if you could report any bugs as issues here in the repository!_
## Feedback and bug reports - Troubleshooting
I'd be grateful if you could report any bugs as issues here in the repository! [Report a bug](https://github.com/theis-js/stockhome/issues/new/choose)
## Update
To update the stack, navigate into the root directory of this repository and run:
To update stockhome to the latest version, navigate into the root directory of this repository and run:
```shell
docker compose pull
git pull
latesttag=$(git describe --tags)
git checkout ${latesttag}
docker compose up -d --build
```
To update to a specific version, replace `latesttag` with the version tag you want to update to. You can view the available version tags here: [Releases](https://github.com/theis-js/stockhome/tags)
**Example to downgrade/update to version `v0.1`:**
```shell
git pull
git checkout v0.1
docker compose up -d --build
```
@@ -114,7 +128,7 @@ docker compose up -d --build
### Prerequisites
- Docker
- Visual Studio Code
- Visual Studio Code (or any other IDE)
- Cloned the repository
### Start backend and database
-1
View File
@@ -42,7 +42,6 @@ services:
build: ./frontend
environment:
BACKEND_HOST: ${BACKEND_HOST}
VITE_BACKEND_URL: /backend
depends_on:
- backend
restart: unless-stopped
-3
View File
@@ -13,9 +13,6 @@ FROM nginx:alpine AS runner
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/dist .
COPY docker-entrypoint.d/10-runtime-env.sh /docker-entrypoint.d/10-runtime-env.sh
RUN chmod +x /docker-entrypoint.d/10-runtime-env.sh
COPY nginx.conf /etc/nginx/templates/default.conf.template
EXPOSE 80
@@ -1,10 +0,0 @@
#!/bin/sh
set -eu
VITE_BACKEND_URL_VALUE="${VITE_BACKEND_URL:-/backend}"
cat > /usr/share/nginx/html/env.js <<EOF
window.__ENV = {
VITE_BACKEND_URL: "${VITE_BACKEND_URL_VALUE}"
};
EOF
-1
View File
@@ -8,7 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/env.js"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+1 -10
View File
@@ -1,13 +1,4 @@
type WindowWithEnv = Window & {
__ENV?: {
VITE_BACKEND_URL?: string;
};
};
const runtimeEnv = (globalThis as unknown as WindowWithEnv).__ENV;
export const API_BASE =
runtimeEnv?.VITE_BACKEND_URL ||
(import.meta as any).env?.VITE_BACKEND_URL ||
import.meta.env.VITE_BACKEND_URL ||
"http://localhost:8004";
"/backend";