mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-29 21:24:12 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a8bbb4525 | |||
| 66ce01cb40 | |||
| 5435d914b3 | |||
| fc4e34da61 | |||
| 730873a347 | |||
| 9f05b1c134 |
+2
-2
@@ -24,8 +24,8 @@ RUN addgroup -g 1000 upsnap &&\
|
||||
WORKDIR /app
|
||||
COPY --from=downloader /app/upsnap upsnap
|
||||
LABEL org.opencontainers.image.source="https://github.com/seriousm4x/UpSnap" \
|
||||
org.opencontainers.image.url="https://github.com/seriousm4x/UpSnap" \
|
||||
org.opencontainers.image.licenses="MIT"
|
||||
org.opencontainers.image.url="https://github.com/seriousm4x/UpSnap" \
|
||||
org.opencontainers.image.licenses="MIT"
|
||||
HEALTHCHECK --interval=10s \
|
||||
CMD curl -fs "http://${UPSNAP_HTTP_LISTEN}/api/health" || exit 1
|
||||
CMD ["serve","--http","${UPSNAP_HTTP_LISTEN}"]
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM node:alpine AS node
|
||||
FROM node:bookworm AS node
|
||||
WORKDIR /app
|
||||
COPY frontend/ .
|
||||
RUN npm i -g pnpm &&\
|
||||
|
||||
@@ -20,6 +20,7 @@ builds:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
- riscv64
|
||||
goarm:
|
||||
- "6"
|
||||
- "7"
|
||||
|
||||
@@ -209,10 +209,9 @@ func SetWakeShutdownJobs(app core.App) {
|
||||
if !isOnline {
|
||||
return
|
||||
}
|
||||
status := d.GetString("status")
|
||||
if status != "online" {
|
||||
return
|
||||
}
|
||||
// The status can be stale when lazy ping marks devices offline after
|
||||
// the last client disconnects. The reachability check above is the
|
||||
// authoritative signal for whether a shutdown command may run.
|
||||
d.Set("status", "pending")
|
||||
if err := app.Save(d); err != nil {
|
||||
log.Error("Failed to save pending device status", "device", d.GetString("name"), "error", err)
|
||||
|
||||
@@ -88,8 +88,6 @@ func wakeUDP(broadcastIp string, deviceIp string, target net.HardwareAddr, passw
|
||||
destinations = append(destinations,
|
||||
fmt.Sprintf("%s:9", deviceIp),
|
||||
fmt.Sprintf("%s:7", deviceIp),
|
||||
"255.255.255.255:9",
|
||||
"255.255.255.255:7",
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
services:
|
||||
upsnap:
|
||||
cap_add:
|
||||
- NET_RAW # Required for privileged ping, network device scan, and IP address tracking (nmap)
|
||||
cap_drop:
|
||||
- ALL
|
||||
container_name: upsnap
|
||||
build:
|
||||
dockerfile: Dockerfile.dev
|
||||
@@ -7,6 +11,10 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/app/pb_data
|
||||
# # If you want to use FQDN instead of an IP and it is a ".local" domain, avahi and dbus must be installed on
|
||||
# # the host, and the host dbus must be mounted in the container.
|
||||
# # Before uncommmenting, ensure you are familiar with potential security implications of mounting dbus
|
||||
# - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
|
||||
# # To use a non-root user, create the mountpoint first before starting
|
||||
# # the container (mkdir data) so that it has the right permissions.
|
||||
# user: 1000:1000
|
||||
|
||||
@@ -10,6 +10,11 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/app/pb_data
|
||||
# # If you want to use FQDN instead of an IP and it is a ".local" domain, avahi and dbus must be installed on
|
||||
# # the host, and the host dbus must be mounted in the container.
|
||||
# # Before uncommmenting, ensure you are familiar with potential security implications of mounting dbus
|
||||
# - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
|
||||
|
||||
# # To use a non-root user, create the mountpoint first (mkdir data) so that it has the right permission.
|
||||
# user: 1000:1000
|
||||
# environment:
|
||||
|
||||
@@ -100,14 +100,6 @@
|
||||
await $pocketbase
|
||||
.collection('users')
|
||||
.authRefresh()
|
||||
.then(async () => {
|
||||
// set settingsPriv store on load
|
||||
if (!$settingsPriv) {
|
||||
const res = await $pocketbase.collection('settings_private').getFirstListItem('');
|
||||
settingsPriv.set(res as SettingsPrivate);
|
||||
}
|
||||
})
|
||||
|
||||
.catch((err) => {
|
||||
// clear the store only on invalidated/expired token
|
||||
const status = err?.status << 0;
|
||||
|
||||
Reference in New Issue
Block a user