- Docker Desktop installed on Windows
- Your environment variables ready (Clerk keys, Database URL)
Make sure your .env file contains these required variables:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_actual_key
CLERK_SECRET_KEY=sk_test_your_actual_secret
DATABASE_URL=postgresql://user:password@host:port/databaseOption A: Using the batch script (Easiest)
docker-build.batOption B: Manual command
docker build \
--build-arg NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key \
--build-arg CLERK_SECRET_KEY=your_secret_key \
--build-arg DATABASE_URL=your_database_url \
-t unipath .Option A: Using the batch script
docker-run.batOption B: Manual command
docker run -p 3000:3000 --name unipath-app unipathYour application will be available at: http://localhost:3000
docker psdocker ps -adocker stop unipath-appdocker start unipath-appdocker rm unipath-appdocker rmi unipathdocker logs unipath-appdocker exec -it unipath-app shIf you get an error that the container already exists:
docker rm unipath-app
docker-run.batIf port 3000 is already in use, you can map to a different port:
docker run -p 8080:3000 --name unipath-app unipathThen access at http://localhost:8080
docker stop unipath-app
docker rm unipath-app
docker rmi unipath
docker-build.bat
docker-run.batFor easier management, you can also use Docker Compose. Create a docker-compose.yml file and run:
docker-compose up- The Dockerfile uses multi-stage builds to optimize image size
- Environment variables are passed during build time and runtime
- The container exposes port 3000 by default
- Prisma migrations are generated during the build process