Skip to content
Snippets Groups Projects
Commit ceb9eca8 authored by Jonas Zohren's avatar Jonas Zohren
Browse files

Added docker support

parent 75b2e98f
No related branches found
No related tags found
No related merge requests found
**/node_modules/
client/public/build/
**.md
\ No newline at end of file
# Build client app
FROM node:12-alpine AS build-env-webapp
COPY client /build
WORKDIR /build
RUN npm install
RUN npm run build
# Build server image
FROM node:12-alpine AS build-env-server
COPY server /build
WORKDIR /build
RUN npm ci --only=production
# Create hardened runtime image
FROM gcr.io/distroless/nodejs:12
COPY --from=build-env-server /build /app
COPY --from=build-env-webapp /build/public /app/public
WORKDIR /app
CMD ["server.js"]
\ No newline at end of file
import { readable, writable } from "svelte/store";
export const API_BASE_URL = "http://localhost:3000/api";
export const API_BASE_URL = "api";
const POLL_FOR_UPDATES = true;
const POLL_INTERVAL = 2500;
const REFRESH_QUERY_STRING_INTERVAL = 5000;
......
This diff is collapsed.
File moved
File moved
This diff is collapsed.
File moved
File moved
File moved
File moved
server/room_previews/jon-t07-6p6-jiy.jpeg

9.45 KiB

server/room_previews/jon-zcn-oui-zyj.jpeg

16 KiB

......@@ -6,9 +6,15 @@ const cp = require("child_process");
const fs = require("fs");
const sleep = require("sleep-promise");
const PORT = 3000;
const BOT_USERNAME = process.env.BOT_USERNAME;
const BOT_PASSWORD = process.env.BOT_PASSWORD;
const PORT = process.env.PORT || 3000;
const BOT_USERNAME =
process.env.BOT_USERNAME ||
console.error("Missing env BOT_USERNAME") ||
process.exit(1);
const BOT_PASSWORD =
process.env.BOT_PASSWORD ||
console.error("Missing env BOT_PASSWORD") ||
process.exit(1);
const BOT_DISPLAY_NAME = process.env.BOT_DISPLAY_NAME || "Puppet";
// Global state:
......@@ -151,5 +157,5 @@ app.post("/api/bulkcreate", async (req, res) => {
});
app.listen(PORT, () => {
console.log(`Example app listening at http://localhost:${PORT}`);
console.log(`Listening on port ${PORT}`);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment