個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Point your browsers to our production instance at ryyppy.net.
Ryyppy.net is a web application which helps you keep track of your consummation of alcoholic beverages. You can also bring your friends along. All you need is an HTML5-compliant browser to see your current state of drunkenness.
Who can see and change users, parties and drinks is described in Access rules.
On a technical level ryyppy.net consists of a backend written in Java and an HTML5 frontend. Backend does all the calculations, user management etc. and provides these via REST web service for frontend to consume.
Requirements:
mvn spring-boot:run (this automatically starts the PostgreSQL database via Docker Compose)localhost:8080To fill the local database with a large set of fake data, see Seed data.
To enable Google login, set the Google OAuth2 credentials as environment variables:
PowerShell:
$env:GOOGLE_CLIENT_ID="your-google-client-id.apps.googleusercontent.com"
$env:GOOGLE_CLIENT_SECRET="your-google-client-secret"
mvn spring-boot:run
Command Prompt:
set GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
set GOOGLE_CLIENT_SECRET=your-google-client-secret
mvn spring-boot:run
Linux/Mac:
export GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
export GOOGLE_CLIENT_SECRET=your-google-client-secret
mvn spring-boot:run
The Google login button will automatically appear on the login page when valid credentials are configured. To disable Google login, simply unset these environment variables or set them to placeholder values.
main is the only long-lived branch. A release is a git tag on main that marks a
milestone; it does not trigger a deploy.
maingit push origin <version>)Set configuration using environment variables:
https://ryyppy.net by the production profile)false)target/ryyppynet.jar to serverjava -jar ryyppynet.jarThe root Dockerfile follows Spring Boot's
Dockerfiles reference:
a Maven stage builds the jar, a second stage runs jarmode=tools extract --layers, and the runtime stage copies the four layers separately and writes a
CRaC checkpoint (see below). -Dspring.aot.enabled=true activates the
build-time bean definitions from the spring-boot-maven-plugin's process-aot
goal. No mvn package is needed first.
The base image is Azul Zulu, the only JDK shipping CRaC's warp engine.
docker build -t ryyppynet \
--build-arg SPRING_DATASOURCE_URL=jdbc:postgresql://<host>:5432/ryyppynet \
--build-arg SPRING_DATASOURCE_USERNAME=ryyppynet \
--build-arg SPRING_DATASOURCE_PASSWORD=ryyppynet \
.
docker run -p 8080:8080 \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://<host>:5432/ryyppynet \
-e SPRING_DATASOURCE_USERNAME=ryyppynet \
-e SPRING_DATASOURCE_PASSWORD=ryyppynet \
ryyppynet
checkpoint.sh runs in the same stage. It starts the application, waits for
Started RyyppyApplication, and triggers a
CRaC
checkpoint with jcmd; the entry point restores that image instead of booting,
which is what Railway's serverless sleep costs on every wake (see Railway
below). It boots against the real database through the SPRING_DATASOURCE_*
build args, read-only - this jar has no flywayInitializer bean (see Database
migrations below) - and best-effort: an unreachable database leaves the build
green and the image boots instead.
-XX:CRaCEngine=warp. CRaC's default CRIU engine needs the
CHECKPOINT_RESTORE and SYS_PTRACE capabilities at both ends, and Railway
grants neither to builds nor to containers. Warp needs no privileges.-XX:CPUFeatures=generic. Railway builds and runs on separate hosts, so
the JVM is held to the baseline every host has.Flyway is enabled by default, so mvn spring-boot:run migrates a fresh local
database. application-production.yml - the profile Railway runs - disables
it; production migrates instead via the pre-deploy command in
.railway/railway.ts:
java -Dspring.profiles.active=production -Dspring.flyway.enabled=true -Dspring.context.exit=onRefresh -jar application.jar
Also set a Pre-deploy Timeout in the service settings dashboard;
.railway/railway.ts does not set it.
Build args are recorded in image history, so docker history reveals the
database password. Railway keeps images private to the project.
Railway detects the root Dockerfile
and builds with it. The service itself (source, pre-deploy command, health
check, domain, serverless sleep) is defined as code in .railway/railway.ts;
the Railway config workflow posts a plan on PRs that touch .railway/ and
applies it when they merge. $PORT is
read by application.yml via server.port: ${PORT:8080}. Database and OAuth2
config come from the environment variables listed above, and Railway
injects them into the build
for the ARGs the Dockerfile declares.
The service sets no start command, so the Dockerfile's ENTRYPOINT defines
how the app starts; a start command set on the service would override it.
Railway's private network is runtime-only, so the checkpoint step only reaches a database available over the public internet.
Serverless is enabled, so the service sleeps after 5-10 minutes without outbound traffic and the next request starts a fresh container - which is the checkpoint restore, not a boot.
Restoring the checkpoint takes ~90ms. The boot the image falls back to when a
build wrote no checkpoint takes ~5.5s, measured on one machine (16 vCPU, JDK
25.0.4.1) against a PostgreSQL 14 container, to the Started RyyppyApplication
log line.