Compare commits

..

2 Commits

Author SHA1 Message Date
Matteo Rosati
a8d25aa7fe fix dockerfile 2026-01-20 11:32:43 +01:00
Matteo Rosati
3fabcaac07 fix ws url 2026-01-20 11:09:36 +01:00
2 changed files with 4 additions and 4 deletions

View File

@@ -39,9 +39,6 @@ RUN apk add --no-cache \
RUN addgroup -g 1000 appuser && \ RUN addgroup -g 1000 appuser && \
adduser -D -u 1000 -G appuser appuser adduser -D -u 1000 -G appuser appuser
# Copy credentials file if it exists
COPY --chown=appuser:appuser credentials.json .
# Copy virtual environment from builder # Copy virtual environment from builder
COPY --from=builder /opt/venv /opt/venv COPY --from=builder /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH" ENV PATH="/opt/venv/bin:$PATH"
@@ -55,6 +52,7 @@ WORKDIR /app
# Copy application files # Copy application files
COPY --chown=appuser:appuser app.py . COPY --chown=appuser:appuser app.py .
COPY --chown=appuser:appuser main.py . COPY --chown=appuser:appuser main.py .
COPY --chown=appuser:appuser credentials.json .
COPY --chown=appuser:appuser static ./static COPY --chown=appuser:appuser static ./static
# Copy and setup entrypoint script # Copy and setup entrypoint script

View File

@@ -1,6 +1,8 @@
(($) => { (($) => {
const isSecure = location.protocol === "https:";
const port = location.port ? `:${location.port}` : "";
var ws = new WebSocket( var ws = new WebSocket(
`ws://${location.protocol + "//" + location.host}${location.port ? ":" + location.port : ""}/ws`, `ws${isSecure ? "s" : ""}://${location.host}${port}/ws`,
); );
const input = $("#message"); const input = $("#message");
const messages = $("#messages"); const messages = $("#messages");