From 32f9c58b80aa8bc9ff09030aefcf3a9d7669ff00 Mon Sep 17 00:00:00 2001 From: Nice Try Date: Fri, 26 Jun 2026 16:57:04 +0800 Subject: [PATCH] test --- .env.example | 2 +- docker-compose.yml | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 0a276f5..0b92342 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ DATABASE_URL="file:./dev.db" COURSES_ROOT="./My_Courses" -NEXT_PUBLIC_APP_URL="http://localhost:6767" +NEXT_PUBLIC_APP_URL="http://localhost:6969" QUIZAPI_KEY="" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8dd70f5..62dcdea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,20 +6,22 @@ services: container_name: offlineacademy restart: unless-stopped ports: - - "6767:6767" + # Host:Container + - "6969:6969" env_file: - .env environment: NODE_ENV: production - PORT: 6767 + PORT: 6969 HOSTNAME: 0.0.0.0 - DATABASE_URL: file:./dev.db - COURSES_ROOT: ./My_Courses - NEXT_PUBLIC_APP_URL: http://localhost:6767 + # Points exactly to where the volume is mounted inside the container + DATABASE_URL: file:/app/prisma/dev.db + COURSES_ROOT: /app/My_Courses + # Matches the port mapped to your host machine + NEXT_PUBLIC_APP_URL: http://localhost:6969 volumes: - # Put your course folders wherever you want on the host, - # then map that folder to /app/My_Courses inside the container. + # Automatically creates ./My_Courses on the host if it doesn't exist - ./My_Courses:/app/My_Courses - - # Persist the SQLite database outside the image. - - ./prisma/dev.db:/app/prisma/dev.db + + # Automatically creates ./prisma_data on the host to hold dev.db safely + - ./prisma_data:/app/prisma \ No newline at end of file