Refactor production setup and database management
- Updated Dockerfile for production to ensure proper database permissions and improved startup script. - Removed outdated PRODUCTION_README.md and consolidated relevant information into other documentation. - Enhanced deploy.sh script to fix database permissions and streamline deployment process. - Modified docker-compose configuration to use a dedicated production file and adjusted port mappings. - Removed legacy docker-compose.yml file to avoid confusion. - Improved session management by refining secure cookie settings based on environment variables. - Deleted obsolete Nginx configuration and old seed scripts to clean up the project structure. - Updated database setup scripts to reflect new structure and removed old seed data scripts. - Adjusted reset-db script to use environment variable for database path. - Enhanced setup-database script to provide dynamic admin credentials in the summary. - Removed unnecessary backup file for SQLite database.
This commit is contained in:
+2
-2
@@ -49,7 +49,7 @@ export async function createSession(payload: Omit<SessionPayload, 'expiresAt'>)
|
||||
const cookieStore = await cookies();
|
||||
cookieStore.set('session', session, {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
secure: process.env.NODE_ENV === 'production' && process.env.NEXTAUTH_URL?.startsWith('https'),
|
||||
expires: expiresAt,
|
||||
sameSite: 'lax',
|
||||
path: '/',
|
||||
@@ -70,7 +70,7 @@ export async function updateSession() {
|
||||
|
||||
cookieStore.set('session', newSession, {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
secure: process.env.NODE_ENV === 'production' && process.env.NEXTAUTH_URL?.startsWith('https'),
|
||||
expires: expires,
|
||||
sameSite: 'lax',
|
||||
path: '/',
|
||||
|
||||
Reference in New Issue
Block a user