ESSL Attendance is a web application for managing biometric attendance devices and employee attendance records.
This Docker image packages the production build of the app so you can run it quickly with Docker or Docker Compose, backed by Supabase/PostgreSQL.
docker-compose.ymlversion: "3.9"
services:
essl-app:
image: aash/essl:latest
container_name: essl-app
restart: unless-stopped
ports:
- "3000:3000"
env_file:
- .env
.env# Copy this file to .env and update the values
# Device Configuration
NEXT_PUBLIC_DEVICE_IP=<device_ip>
NEXT_PUBLIC_DEVICE_PORT=<device_port>
NEXT_PUBLIC_DEVICE_SERIAL=<device_serial>
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=<supabase_url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<supabase_anon_key>
SUPABASE_SERVICE_ROLE_KEY=<supabase_service_role_key>
# Database Configuration (for Drizzle auto migration)
#SUPABASE_DB_HOST_POSTGRES_URL=<supabase_db_host IP>
SUPABASE_DB_PASSWORD=<supabase_db_password>
SUPABASE_DB_PORT_POSTGRES_DIRECT=<postgres_port>
SUPABASE_DB_USE_DIRECT=true
SUPABASE_DB_USER_POSTGRES=<postgres_user>
SUPABASE_DB_NAME_POSTGRES=<postgres_db_name>
# Application Configuration
PROJECT_ENVIRONMENT=<environment>
DB_SCHEMA_NAME_PROD=<schema_name_prod>
DB_SCHEMA_NAME_DEV=<schema_name_dev>
DISABLE_AUTO_MIGRATE=false # set to true to disable automatic DB migrations on startup
NEXT_PUBLIC_APP_VERSION=1.23
# JWT Authentication Configuration
JWT_SECRET=<jwt_secret_at_least_64_chars>
JWT_EXPIRES_IN=1d
JWT_REFRESH_EXPIRES_IN=7d
Automatic migrations:
On container startup, database migrations run automatically whenDISABLE_AUTO_MIGRATE=false.
If you prefer to manage schema changes yourself, setDISABLE_AUTO_MIGRATE=truein your.env.
After the container is running and migrations have completed, create your first admin user using the interactive script.
Prerequisites:
Steps:
Clone the repository (if you haven't already):
git clone https://github.com/aash591/essl.git
cd essl
Install dependencies:
npm install
Ensure your .env file is configured with the correct database credentials (same values used in your Docker container).
Run the admin creation script:
npx tsx scripts/create-admin.ts
Follow the interactive prompts to provide:
The script will create the admin user in your database using the configured schema based on PROJECT_ENVIRONMENT.
Note: The script connects directly to your database using the connection details from your
.envfile. Make sure your database is accessible from your host machine.
Content type
Image
Digest
sha256:130139bf4…
Size
87.7 MB
Last updated
5 months ago
docker pull aash591/essl:v1.67