This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
docker build -t publicbets-nextjs .
docker-compose up --build
docker-compose up -d --build
docker-compose -f "docker-compose.prod.yml" up -d --build
npx prisma db push
npx prisma migrate dev npx prisma generate
docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=BETpUBlic2024 -e POSTGRES_USER=publicbets -e POSTGRES_DB=publicbets -d postgres
docker buildx build --platform linux/amd64 -t chetanb1029/publicbets-nextjs:latest --push .
- apt install docker-compose
- sudo apt update && sudo apt install git
- git --version
- ssh-keygen -t ed25519 -C "[email protected]" (it will save inside /root/.ssh usually)
- cat id_ed25519.pub (to copy public key)
- Add this public key into github setting -> new SSH key
- Test ssh with - ssh -T [email protected] (it will display Hi chetan1029! You've successfully....)
- go to cd /root/publicbets/
- git clone [email protected]:chetan1029/publicbets-final.git
- Run - docker compose build
- Run - docker compose up -d
- Sometime postgres gonna give error of "role not found" or credentials error - just delete volume and build/up again
docker builder prune - to delete build cache docker system df - to check the system memory usage