Compare commits
5 Commits
7abbc2c9ae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8903352565 | |||
| 9a77996057 | |||
| 8fd73ec786 | |||
| a324d24b72 | |||
| 98c69dfc7d |
@@ -67,7 +67,7 @@ jobs:
|
|||||||
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -trimpath -ldflags "-s -w" \
|
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -trimpath -ldflags "-s -w" \
|
||||||
-o "dist/package/${BINARY_NAME}${{ matrix.ext }}" .
|
-o "dist/package/${BINARY_NAME}${{ matrix.ext }}" .
|
||||||
# Assets: statisches Verzeichnis beilegen
|
# Assets: statisches Verzeichnis beilegen
|
||||||
cp -r static dist/package/
|
cp -r web dist/package/
|
||||||
|
|
||||||
- name: Package archive with static assets
|
- name: Package archive with static assets
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -------- Dockerfile (Multi-Stage Build) --------
|
# -------- Dockerfile (Multi-Stage Build) --------
|
||||||
# 1. Builder-Stage
|
# 1. Builder-Stage
|
||||||
FROM golang:1.24-alpine AS builder
|
FROM golang:1.25-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.* ./
|
COPY go.* ./
|
||||||
@@ -15,14 +15,14 @@ FROM alpine:3.22
|
|||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
RUN mkdir /web
|
RUN mkdir /web
|
||||||
COPY --from=builder /bin/vcc /bin/vcc
|
COPY --from=builder /bin/vcc /bin/vcc
|
||||||
COPY ./web /web
|
COPY ./web /bin/web
|
||||||
# Default listens on :8090 – siehe main.go
|
# Default listens on :8090 – siehe main.go
|
||||||
EXPOSE 8090
|
EXPOSE 8080
|
||||||
|
|
||||||
# Environment defaults; können per compose überschrieben werden
|
# Environment defaults; können per compose überschrieben werden
|
||||||
ENV CLIPBOARD_TOKEN="" \
|
ENV CLIPBOARD_TOKEN="" \
|
||||||
CLIPBOARD_DATA="" \
|
CLIPBOARD_DATA="" \
|
||||||
PORT=":8090" \
|
PORT=":8080" \
|
||||||
MAX_PER_ROOM=200
|
MAX_PER_ROOM=200
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/vcc"]
|
ENTRYPOINT ["/bin/vcc"]
|
||||||
@@ -3,47 +3,13 @@
|
|||||||
"rooms": {
|
"rooms": {
|
||||||
"default": [
|
"default": [
|
||||||
{
|
{
|
||||||
"id": "20250906T094234.159189600Z-51dab5cf1cc000fb",
|
"id": "20250906T230610.920156600Z-9cb85e5bffcf0eef",
|
||||||
"room": "default",
|
"room": "default",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"content": "^9rhME!\u003e-Q#6k969og^d",
|
"content": "2ao+A?7=Tbp,t*7$3Yo9",
|
||||||
"created_at": "2025-09-06T09:42:34.1591896Z"
|
"created_at": "2025-09-06T23:06:10.9201566Z"
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "20250906T094239.420737500Z-3884c4d0cb8a9ac4",
|
|
||||||
"room": "default",
|
|
||||||
"type": "text",
|
|
||||||
"content": "f,u6g-r8E2:gNTu/w)b)",
|
|
||||||
"created_at": "2025-09-06T09:42:39.4207375Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "20250906T094240.237113600Z-0a9fe15a381b458f",
|
|
||||||
"room": "default",
|
|
||||||
"type": "text",
|
|
||||||
"content": "nyG\u003eC2eq[M4RP2;+u9Tz",
|
|
||||||
"created_at": "2025-09-06T09:42:40.2371136Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "20250906T094241.057489000Z-544852c456ff133e",
|
|
||||||
"room": "default",
|
|
||||||
"type": "text",
|
|
||||||
"content": ".kC49}YqE7P~P5i7dadk",
|
|
||||||
"created_at": "2025-09-06T09:42:41.057489Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "20250906T142832.444200200Z-5cbf503227067e52",
|
|
||||||
"room": "default",
|
|
||||||
"type": "text",
|
|
||||||
"content": "n?x2Pr!d929FK9!7Ls5L",
|
|
||||||
"created_at": "2025-09-06T14:28:32.4442002Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "20250906T142832.444720600Z-ac6a369b19a2ca3a",
|
|
||||||
"room": "default",
|
|
||||||
"type": "text",
|
|
||||||
"content": "UoT$YvL%eAKh\u0026SG9VS\u0026$",
|
|
||||||
"created_at": "2025-09-06T14:28:32.4447206Z"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"privat": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,3 +1,3 @@
|
|||||||
module git.send.nrw/sendnrw/virtual-clipboard
|
module git.send.nrw/sendnrw/virtual-clipboard
|
||||||
|
|
||||||
go 1.24.4
|
go 1.25.3
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -480,7 +480,7 @@ func (s *Server) routes() http.Handler {
|
|||||||
mux.HandleFunc("/status", s.handleStatus)
|
mux.HandleFunc("/status", s.handleStatus)
|
||||||
|
|
||||||
// Static UI
|
// Static UI
|
||||||
sub, _ := fs.Sub(embedded, "/web")
|
sub, _ := fs.Sub(embedded, "web")
|
||||||
mux.Handle("/", http.FileServer(http.FS(sub)))
|
mux.Handle("/", http.FileServer(http.FS(sub)))
|
||||||
|
|
||||||
return mux
|
return mux
|
||||||
|
|||||||
Reference in New Issue
Block a user