Compare commits
2 Commits
3dd38dc6fa
...
a8d25aa7fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8d25aa7fe | ||
|
|
3fabcaac07 |
@@ -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
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user