Compare commits

..

No commits in common. 'main' and 'add_game_knights' have entirely different histories.

@ -1,8 +0,0 @@
node_modules
client/dist
games/
server/.lake
**/.DS_Store
logs/
relay/prev_cpu_metric
test.ecosystem.config.cjs

@ -1,29 +0,0 @@
FROM node:23-bookworm
RUN apt update && apt upgrade -y
RUN apt install -y bubblewrap
WORKDIR /app
# Install elan
RUN curl -sSfL https://github.com/leanprover/elan/releases/download/v3.0.0/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz && \
./elan-init -y
ENV PATH="/root/.elan/bin:${PATH}"
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy project files
COPY . .
# Build the project
RUN npm run build
EXPOSE 8080
# Set the entrypoint
CMD ["npm", "run", "production"]

@ -1,35 +1,3 @@
# lean4game fork
Questo è un fork di **lean4game** con supporto per essere self-hostato con Docker.
## Deployment con Docker Compose
Dopo aver clonato questa repo, per prima cosa serve creare [un token di API per GitHub](https://github.com/settings/developers) per permettere a lean4game di importare da solo i vari "game". Possiamo mettere questo token ed il nostro nome utente in un file `.env` come segue
```
export LEAN4GAME_GITHUB_USER='...'
export LEAN4GAME_GITHUB_TOKEN='...'
```
poi per lanciare tutto con docker compose basta eseguire
```bash
$ source .env
$ docker compose up -d
```
Questo comando lancierà lean4game su `http://locahost:8080`.
### Aggiungere Giochi
Per scaricare nuovi giochi basta fare una chiamata al seguente url
- `https://{host}/import/trigger/{org}/{repo}`
Ad esempio per scaricare <https://github.com/leanprover-community/nng4> basta andare all'indirizzo `https://{host}/import/trigger/leanprover-community/nng4` per aggiungere _Natural Number Game_.
---
# Lean 4 Game # Lean 4 Game
This is the source code for a Lean game platform hosted at [adam.math.hhu.de](https://adam.math.hhu.de). This is the source code for a Lean game platform hosted at [adam.math.hhu.de](https://adam.math.hhu.de).

2964
bun.lock

File diff suppressed because it is too large Load Diff

@ -24,11 +24,7 @@ You should see a white screen which shows import updates and eventually reports
Now you can immediately play the game at `adam.math.hhu.de/#/g/{USER}/{REPOSITORY}`! Now you can immediately play the game at `adam.math.hhu.de/#/g/{USER}/{REPOSITORY}`!
## 4. Update ## 4. Main page
To upload a new version of the game you will have to repeat 1. and 2. whenever you want to publish the updated version.
## 5. Main page
Adding games to the main page happens manually by the server maintainers. Tell us if you want us Adding games to the main page happens manually by the server maintainers. Tell us if you want us
to add a tile for your game! to add a tile for your game!

@ -1,14 +0,0 @@
services:
lean4game:
build: .
privileged: true # needed to run bubblewrap inside docker
environment:
- LEAN4GAME_GITHUB_USER=${LEAN4GAME_GITHUB_USER}
- LEAN4GAME_GITHUB_TOKEN=${LEAN4GAME_GITHUB_TOKEN}
ports:
- "8080:8080"
volumes:
- games_data:/app/games
volumes:
games_data:
Loading…
Cancel
Save