Game Features
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{$FPOL_DOMAIN} {
|
||||
encode zstd gzip
|
||||
header {
|
||||
X-Content-Type-Options nosniff
|
||||
Referrer-Policy no-referrer
|
||||
X-Frame-Options DENY
|
||||
Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'"
|
||||
}
|
||||
reverse_proxy app:8080
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Build context is the parent workspace containing product-fpol, modulus, noto and ligo.
|
||||
FROM node:24-bookworm-slim AS frontend
|
||||
WORKDIR /frontend
|
||||
COPY product-fpol/frontend/package*.json ./
|
||||
RUN npm ci
|
||||
COPY product-fpol/frontend/index.html product-fpol/frontend/lab.html product-fpol/frontend/tsconfig.json product-fpol/frontend/vite.config.ts ./
|
||||
COPY product-fpol/frontend/src ./src
|
||||
RUN npm run build
|
||||
|
||||
FROM ubuntu:24.04 AS backend
|
||||
ENV DEBIAN_FRONTEND=noninteractive CC=gcc-12 CXX=g++-12
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc-12 g++-12 cmake ninja-build make pkg-config git ca-certificates python3 python3-venv perl && rm -rf /var/lib/apt/lists/*
|
||||
RUN python3 -m venv /opt/build-python && /opt/build-python/bin/pip install conan==2.26.2
|
||||
ENV PATH="/opt/build-python/bin:${PATH}"
|
||||
WORKDIR /workspace
|
||||
COPY modulus ./modulus
|
||||
COPY noto ./noto
|
||||
COPY ligo ./ligo
|
||||
COPY product-fpol ./product-fpol
|
||||
RUN conan profile detect && python product-fpol/tools/build_workspace.py --build-type Release
|
||||
|
||||
FROM ubuntu:24.04 AS runtime
|
||||
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libstdc++6 curl && rm -rf /var/lib/apt/lists/* && useradd --uid 10001 --create-home fpol && mkdir -p /data/backups && chown -R fpol:fpol /data && chmod 700 /data
|
||||
COPY --from=backend /workspace/product-fpol/build/workspace_release/fpol_server /workspace/product-fpol/build/workspace_release/fpol_admin /workspace/product-fpol/build/workspace_release/fpol_ingest /usr/local/bin/
|
||||
COPY --from=frontend /frontend/dist /app/web
|
||||
COPY product-fpol/data /app/data
|
||||
COPY product-fpol/deploy/entrypoint.sh /usr/local/bin/fpol-entrypoint
|
||||
USER fpol
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["fpol-entrypoint"]
|
||||
CMD ["fpol_server", "--host", "0.0.0.0", "--database", "/data/fpol.sqlite", "--web-root", "/app/web"]
|
||||
@@ -0,0 +1,19 @@
|
||||
*
|
||||
!product-fpol
|
||||
!product-fpol/**
|
||||
!modulus
|
||||
!modulus/**
|
||||
!noto
|
||||
!noto/**
|
||||
!ligo
|
||||
!ligo/**
|
||||
**/.git
|
||||
**/build
|
||||
**/node_modules
|
||||
**/dist
|
||||
**/var
|
||||
**/.env*
|
||||
**/__pycache__
|
||||
**/.aws
|
||||
**/.codex
|
||||
**/.agents
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
umask 077
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user