My submission for TISC challenge
https://www.csit.gov.sg/events/tisc/challenge-submissions
✅ Docker setup is fully functional!
The Docker setup provides a complete containerized environment with automatic database setup, migrations, and application deployment.
- Clone the repository and navigate to the project directory:
git clone <repository-url>
cd tisc-passkey-
Environment Configuration:
The Docker setup uses environment variables defined in
docker-compose.yml. To customize:- For local development: Use the default values (application will run on
http://localhost:8080) - For production: Edit the environment variables in
docker-compose.yml:
environment: APP_NAME: passkey.tisc APP_DOMAIN: your-domain.com # Change this to match domain without HTTPS PASSKEY_ORIGIN: https://your-domain.com # Change this (use https for production) JETZIG_SESSION_COOKIE: passkey.tisc # You can leave this alone. This is just Session cookie's name. JETZIG_SECRET: YourSecureRandomString123456789 # Not super important to edit this but edit if you want. CTF_FLAG: TISC{your_custom_flag_here} # Default CTF flag is set, or override it.
- For local development: Use the default values (application will run on
-
Build and run with Docker Compose:
docker-compose upThe application will:
- Set up PostgreSQL database
- Install Zig 0.15.0-dev with architecture support (x86_64/aarch64)
- Install OpenSSL (required by Passcay/WebAuthn)
- Build application in memory-safe mode (ReleaseSafe)
- Run database migrations automatically
- Seed the database with initial data
- Start the application server
- Access the application at
http://localhost:8080
To stop the containers:
docker-compose downTo remove all data and start fresh:
docker-compose down -vRequires:
-
Zig > 0.15.0-dev.377+f01833e03
-
PostgreSQL
-
Jetzig CLI
-
OpenSSL installed on system (Passcay requirement).
-
Set up the environment variables:
cp .env.example .env
# edit .env- Ensure you have PostgreSQL running and create the database:
CREATE DATABASE tisc_passkey;
CREATE USER tisc_passkey WITH PASSWORD 'tisc_passkey';
GRANT ALL PRIVILEGES ON DATABASE tisc_passkey TO tisc_passkey;- Perform migration and seed the database:
jetzig database migrate
jetzig database seed- Run development server, and go to
http://localhost:8080when it's ready:
jetzig server