Compare commits

...

11 Commits

Author SHA1 Message Date
9a906ec55c http to https changed in API page
All checks were successful
/ push_to_registry (push) Successful in 51s
2026-02-02 21:32:30 +01:00
8b93585422 workflow angepasst
All checks were successful
/ push_to_registry (push) Successful in 1m14s
2026-01-24 17:52:15 +01:00
59dd16d4ac fixed code URL
Some checks failed
/ push_to_registry (push) Failing after 1m38s
2026-01-24 17:42:32 +01:00
d7678274be added pull info
Some checks failed
/ push_to_registry (push) Failing after 1m38s
2026-01-17 22:57:04 +01:00
4a8f7525e7 updated README 2026-01-17 22:54:57 +01:00
fb55f47e5c fixed spelling 2026-01-17 22:32:35 +01:00
0251b9dc69 undo centered image, did not work 2026-01-17 22:30:58 +01:00
2b505b0d9d centered image 2026-01-17 22:30:00 +01:00
cb3545f261 updated claim in README.md 2026-01-17 22:29:08 +01:00
d673b97b4b deleted obsolete lines in misc/docker-compose.traefik.yml 2026-01-17 22:26:58 +01:00
1be4aeb6b8 updated MoreUsage.md 2026-01-17 22:24:16 +01:00
5 changed files with 62 additions and 16 deletions

View File

@@ -14,8 +14,8 @@ jobs:
- name: Login to Gitea
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY_URL }} # gitea.scu.si
username: ${{ gitea.actor }}
registry: ${{ vars.REGISTRY_URL }} # gitea.scu.si
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
@@ -26,5 +26,5 @@ jobs:
# Hier wird die Git-Referenz automatisch als Docker-Tag genutzt
#tags: gitea.scu.si/florianwalther/password-generator:${{ gitea.ref_name }}
tags: |
gitea.scu.si/florianwalther/password-generator:${{ gitea.ref_name }}
gitea.scu.si/florianwalther/password-generator:latest
gitea.scu.si/florian.walther/password-generator:${{ gitea.ref_name }}
gitea.scu.si/florian.walther/password-generator:latest

View File

@@ -1,6 +1,6 @@
# Web-Password
_a web based password generator_
_a web based password generator, with an API endpoint_
![App Screenshot](img/screenshot.png)
@@ -16,7 +16,7 @@ There is a demo at [https://passwd.scu.si](https://passwd.scu.si)
## Usage
The follwoing example shows how to get up your own instance with `docker compose`.
The following example shows how to get up your own instance with `docker compose`.
```
git clone https://gitea.scu.si/FlorianWalther/Web-Password.git
@@ -26,4 +26,15 @@ docker compose pull
docker compose up -d
```
## Docker image
The latest official docker image is at [https://gitea.scu.si/FlorianWalther/-/packages/container/password-generator/latest](https://gitea.scu.si/FlorianWalther/-/packages/container/password-generator/latest)
You can pull it like this:
```
docker pull gitea.scu.si/florianwalther/password-generator:latest
```
## more usage examples
There are some more usage example in [misc/MoreUsage.md](misc/MoreUsage.md)

View File

@@ -119,7 +119,7 @@ func helpHandler(w http.ResponseWriter, r *http.Request) {
<script>
// Dynamisch den aktuellen Hostnamen ermitteln
const currentHost = window.location.host;
const apiEndpoint = "http://" + currentHost + "/api/password";
const apiEndpoint = "https://" + currentHost + "/api/password";
// Hostnamen in die Beispiele eintragen
document.getElementById("api-endpoint").textContent = apiEndpoint;
@@ -256,7 +256,7 @@ html := fmt.Sprintf(
<body>
<div class="container">
<a href="/help" class="help-link">API</a>
<a class="about-link" href="https://gitea.scu.si/FlorianWalther/Web-Password">code</a>
<a class="about-link" href="https://gitea.scu.si/Florian.Walther/Web-Password">code</a>
<h1>Generiertes Passwort</h1>
<div id="password">%s</div>
<div class="buttons">

View File

@@ -1,31 +1,60 @@
## bash alias
You can configure an bash alias in your `~/.bashrc` like this:
# Baue die Go-Anwendung
```
## genpasswd alias
alias genpasswd='echo $(curl -s https://passwd.scu.si/api/password)'
```
After making above changes you have to reload your ~/bashrc, in order to activate your changes.
```
. ~/.bashrc
```
Now you can enter `genpasswd` and get a fresh password from the API Endpoint.
# building the app
you can build the app yourself like this:
```
go build -o password-generator ./
```
# Baue das Docker-Image
# build a docker container
```
docker build -t password-generator .
```
# Starte den Docker Container
# start the docker container
```
docker run -p 8080:8080 password-generator
```
## mit docker-compose
## docker-compose
Ein `docker-compose.yml` wird mitgeliefert.
There are two example docker-compose files in the [misc](./) directory.
### docker-compose.yml
A basic variant that just brings up the container and export port 8080.
The basic variant can be used without modifications.
### docker-compose.traefik.yml
The other one is meant to be used behind a traefik reverse proxy.
This variant has lables to configure traefik accordingly.
The traefik variant needs to be adjusted to your environment before
you can use it successfully.
### initial pull
```
docker compose login gitea.scu.si
docker compose pull
```
@@ -41,5 +70,13 @@ docker compose up -d
docker compose down
```
### update container
In order to update your container to the current version, do this:
```
docker compose pull
docker compose down
docker compose up -d
```

View File

@@ -5,8 +5,6 @@ services:
restart: always
expose:
- "8080:8080"
# Falls die Registry privat ist, muss der Host zuvor mit
# 'docker login gitea.scu.si' angemeldet worden sein.
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_backend"