Compare commits
2 commits
4880f695fb
...
90e9bba1e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90e9bba1e0 | ||
|
|
fd42eeccdb |
2 changed files with 23 additions and 5 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
### `Dockerfile`
|
|
||||||
```dockerfile
|
|
||||||
# Multi-Stage Dockerfile for Gothic II Mod Website
|
# Multi-Stage Dockerfile for Gothic II Mod Website
|
||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
|
|
@ -7,7 +5,7 @@ WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies first for better Docker layer caching
|
# Install dependencies first for better Docker layer caching
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm install
|
||||||
|
|
||||||
# Copy source code and build the production bundle
|
# Copy source code and build the production bundle
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
@ -23,7 +21,7 @@ ENV PORT=3000
|
||||||
|
|
||||||
# Install production dependencies only
|
# Install production dependencies only
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci --only=production
|
RUN npm install --omit=dev
|
||||||
|
|
||||||
# Copy built dist files and default cms data from builder
|
# Copy built dist files and default cms data from builder
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
|
|
@ -33,4 +31,3 @@ COPY --from=builder /app/cms-data.json ./cms-data.json
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
CMD ["node", "dist/server.cjs"]
|
CMD ["node", "dist/server.cjs"]
|
||||||
```
|
|
||||||
|
|
|
||||||
|
|
@ -457,6 +457,27 @@ export const AdminCMSModal: React.FC<AdminCMSModalProps> = ({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Security & Admin PIN Section */}
|
||||||
|
<div className="bg-zinc-950/80 border border-amber-900/60 rounded-xl p-4 mt-6 space-y-3">
|
||||||
|
<h4 className="text-sm font-serif font-bold text-amber-300 flex items-center gap-2">
|
||||||
|
<KeyRound className="w-4 h-4 text-amber-400" />
|
||||||
|
CMS Passwort / Zugangs-PIN
|
||||||
|
</h4>
|
||||||
|
<p className="text-xs text-zinc-400">
|
||||||
|
Hier kannst du das Passwort ändern, das zum Freischalten dieses Modder-Portals benötigt wird.
|
||||||
|
Nach dem Klicken auf <strong className="text-amber-200">"Änderungen Live Speichern"</strong> wird das neue Passwort in <code className="text-amber-300 bg-zinc-900 px-1 py-0.5 rounded">cms-data.json</code> übernommen.
|
||||||
|
</p>
|
||||||
|
<div className="max-w-xs">
|
||||||
|
<label className="block text-xs font-mono text-amber-400 mb-1">Neues CMS Passwort</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
value={formData.adminPin || "gothic2026"}
|
||||||
|
onChange={(e) => setFormData({ ...formData, adminPin: e.target.value })}
|
||||||
|
className="w-full bg-zinc-900 border border-amber-800/80 rounded px-3 py-2 text-sm font-mono text-amber-200 focus:border-amber-500 focus:ring-1 focus:ring-amber-500"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue