Track your train trips and know when you've seen it all!
Copy docker/.env.example
to docker/.env
and fill in the following values:
FRONTEND_GEOPS_API_KEY
: The API key for the GeOps APIBACKEND_JWT_SECRET_KEY
: A 512-bit secret key for JWT signing (generate one withopenssl rand -base64 172 | tr -d '\n'
)
Then run docker compose up --build
in the docker
directory to build and start the frontend and backed.
The backend will initialize its database on first run, so it may take a few seconds to start up (this also includes the synchronization of reference data from the SBB OpenData, which takes around 30 seconds).
Using the default docker compose configuration, the frontend will be available at https://localhost:3000 and the backend at https://localhost:8080/api.
The frontend is build using Nuxt 3, to start a development servers run the following
commands in the frontend
directory:
pnpm install
pnpm run dev
The backend is a simple Spring Boot application, an IntelliJ run
configuration with sample environment variables is available in .run/ChooChooApplication.run.xml
which starts the
backend using the appropriate settings for the frontend development server.
Using gradle, the backend can be started with the following commands:
export DATABASE_URL="{database url}"
export JWT_SECRET_KEY="{512-bit base64 encoded jwt secret key}"
./gradlew bootRun