copy creds in container
This commit is contained in:
@@ -39,6 +39,9 @@ RUN apk add --no-cache \
|
||||
RUN addgroup -g 1000 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 --from=builder /opt/venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
(($) => {
|
||||
var ws = new WebSocket("ws://localhost:8000/ws");
|
||||
var ws = new WebSocket(
|
||||
`ws://${location.protocol + "//" + location.host}${location.port ? ":" + location.port : ""}/ws`,
|
||||
);
|
||||
const input = $("#message");
|
||||
const messages = $('#messages');
|
||||
const messages = $("#messages");
|
||||
var lastMessage;
|
||||
|
||||
$('#button').on('click', () => {
|
||||
$("#button").on("click", () => {
|
||||
const message = input.val();
|
||||
|
||||
if (message) {
|
||||
ws.send(message);
|
||||
lastMessage = $('<div class="message received"><p>Loading...</p></div>')
|
||||
messages.append(`<div class="message sent"><p>${message}</p></div>`)
|
||||
lastMessage = $('<div class="message received"><p>Loading...</p></div>');
|
||||
messages.append(`<div class="message sent"><p>${message}</p></div>`);
|
||||
messages.append(lastMessage);
|
||||
|
||||
input.val("");
|
||||
@@ -26,8 +28,7 @@
|
||||
|
||||
if (content.textContent === "<<END>>") {
|
||||
lastMessage.html(marked.parse(lastMessage.text()));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
lastMessage.append(content);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user