Update Next.js configuration and enhance dynamic rendering: Set output to 'standalone' in next.config.js for improved deployment. Implement 'force-dynamic' rendering in multiple pages (Home, Admin, Events, Leaderboard) to ensure fresh data retrieval on each request.
This commit is contained in:
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: got-mc-app
|
||||
ports:
|
||||
- "3040:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=file:./prisma/dev.db
|
||||
- NEXTAUTH_URL=http://localhost:3000
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-change-this-secret-in-production}
|
||||
volumes:
|
||||
# Persist database
|
||||
- ./prisma/dev.db:/app/prisma/dev.db
|
||||
- ./prisma/migrations:/app/prisma/migrations
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"wget",
|
||||
"--quiet",
|
||||
"--tries=1",
|
||||
"--spider",
|
||||
"http://localhost:3000/api/health || exit 1",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
Reference in New Issue
Block a user