diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..7029e48
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,46 @@
+# Use Debian-based image with better build support
+FROM node:16-bullseye AS builder
+
+# Install system dependencies for node-canvas
+RUN apt-get update && apt-get install -y \
+ python3 \
+ make \
+ g++ \
+ libcairo2-dev \
+ libpango1.0-dev \
+ libjpeg-dev \
+ libgif-dev \
+ librsvg2-dev \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+
+# Pin known working npm version
+RUN npm install -g npm@8.19.4
+
+WORKDIR /app
+COPY package.json package-lock.json ./
+
+# Use legacy peer deps to avoid vite conflict
+RUN npm install --legacy-peer-deps
+
+COPY . .
+
+# Optional: skip gen if it fails
+RUN npm run gen || true
+RUN npm run build
+
+# ---- Runtime image ----
+FROM nginx:stable-alpine
+
+LABEL org.opencontainers.image.source="https://github.com/sharechess/sharechess"
+
+COPY --from=builder /app/dist /usr/share/nginx/html
+COPY nginx.conf /etc/nginx/conf.d/sharechess.conf
+RUN rm /etc/nginx/conf.d/default.conf
+
+EXPOSE 80
+
+HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
+ CMD curl -f http://localhost/ || exit 1
+
+CMD ["nginx", "-g", "daemon off;"]
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..73ad262
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,21 @@
+version: "3.8"
+services:
+ sharechess:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ container_name: sharechess
+ ports:
+ - "8012:80"
+ restart: unless-stopped
+ healthcheck:
+ test: ["CMD", "curl", "-f", "http://localhost/"]
+ interval: 30s
+ timeout: 5s
+ retries: 5
+ start_period: 5s
+ logging:
+ driver: json-file
+ options:
+ max-size: "10m"
+ max-file: "3"
diff --git a/index.html b/index.html
index 80cf03c..a23b646 100644
--- a/index.html
+++ b/index.html
@@ -3,47 +3,19 @@
-
+
ShareChess
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
=4"
}
},
+ "node_modules/tempfile/node_modules/uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
+ "dev": true,
+ "bin": {
+ "uuid": "bin/uuid"
+ }
+ },
"node_modules/through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
@@ -7291,16 +7302,16 @@
}
},
"node_modules/typescript": {
- "version": "4.6.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
- "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
}
},
"node_modules/ua-parser-js": {
@@ -7359,13 +7370,15 @@
"dev": true
},
"node_modules/uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
- "dev": true,
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
"bin": {
- "uuid": "bin/uuid"
+ "uuid": "dist/bin/uuid"
}
},
"node_modules/v8-compile-cache-lib": {
@@ -12663,6 +12676,14 @@
"requires": {
"temp-dir": "^1.0.0",
"uuid": "^3.0.1"
+ },
+ "dependencies": {
+ "uuid": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+ "dev": true
+ }
}
},
"through": {
@@ -12756,9 +12777,9 @@
"dev": true
},
"typescript": {
- "version": "4.6.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
- "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
+ "version": "5.8.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true
},
"ua-parser-js": {
@@ -12798,10 +12819,9 @@
"dev": true
},
"uuid": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "dev": true
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="
},
"v8-compile-cache-lib": {
"version": "3.0.1",
diff --git a/package.json b/package.json
index 518a874..c70bd31 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,7 @@
"mime": "^3.0.0",
"npm": "^8.8.0",
"ts-node": "^10.7.0",
- "typescript": "^4.4.4",
+ "typescript": "^5.8.3",
"vite": "^2.7.2",
"vite-plugin-solid": "^2.2.5"
},
@@ -43,6 +43,7 @@
"howler": "^2.2.3",
"is-mobile": "^3.0.0",
"ua-parser-js": "^1.0.2",
+ "uuid": "^9.0.1",
"webm-writer": "^1.0.0"
}
}
diff --git a/src/ui/components/Share.tsx b/src/ui/components/Share.tsx
index 6687bcd..43ac55a 100644
--- a/src/ui/components/Share.tsx
+++ b/src/ui/components/Share.tsx
@@ -339,58 +339,7 @@ const Share: Component<{ handlers: Handlers; class?: string }> = (props) => {
["Chrome", "Firefox", "Opera"].includes(state.browser as string)
}
>
-
-
- Install this style via{" "}
-
- Stylus
-
-
-
- Pieces:{" "}
-
- lichess
-
- |
-
- chess.com
-
-
-
- Board:
-
- lichess
-
- |
-
- chess.com
-
-
+ {/* Removed Stylus install and board/pieces links */}
);