mirror of
https://github.com/nicetry247/offlineacademy.git
synced 2026-08-28 11:27:15 +00:00
docs: recommend Docker Hub as primary deployment
This commit is contained in:
@@ -24,8 +24,8 @@
|
|||||||
- [Feature Highlights](#feature-highlights)
|
- [Feature Highlights](#feature-highlights)
|
||||||
- [Screenshots](#screenshots)
|
- [Screenshots](#screenshots)
|
||||||
- [Tech Stack](#tech-stack)
|
- [Tech Stack](#tech-stack)
|
||||||
- [Quick Start](#quick-start)
|
- [Quick Start: Docker Hub](#quick-start-docker-hub)
|
||||||
- [Docker Deployment](#docker-deployment)
|
- [Other Deployment Options](#other-deployment-options)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Course Folder Structure](#course-folder-structure)
|
- [Course Folder Structure](#course-folder-structure)
|
||||||
- [Data & Persistence](#data--persistence)
|
- [Data & Persistence](#data--persistence)
|
||||||
@@ -111,8 +111,9 @@ OfflineAcademy is designed for **single-user local/LAN deployments**: home serve
|
|||||||
|
|
||||||
### Deployment-Friendly
|
### Deployment-Friendly
|
||||||
|
|
||||||
- Local Node.js deployment.
|
- Docker Hub image for the fastest install.
|
||||||
- Docker and Docker Compose support.
|
- Docker Compose support for repeatable local/LAN deployment.
|
||||||
|
- Local Node.js deployment for development or customization.
|
||||||
- Portable folder mounts for courses and database.
|
- Portable folder mounts for courses and database.
|
||||||
- Suitable for trusted LAN/homelab environments.
|
- Suitable for trusted LAN/homelab environments.
|
||||||
|
|
||||||
@@ -154,27 +155,118 @@ Styling Tailwind CSS, Radix UI
|
|||||||
Database SQLite
|
Database SQLite
|
||||||
ORM Prisma
|
ORM Prisma
|
||||||
Runtime Node.js
|
Runtime Node.js
|
||||||
Deploy Docker / Docker Compose or local Node.js
|
Deploy Docker Hub / Docker Compose recommended; local Node.js supported
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start: Docker Hub
|
||||||
|
|
||||||
|
Docker is the recommended way to run OfflineAcademy.
|
||||||
|
|
||||||
|
It avoids local Node.js setup, uses the published image, and keeps your courses/database mounted outside the container.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
|
- Docker
|
||||||
|
- Docker Compose
|
||||||
|
- A folder containing your course videos
|
||||||
|
|
||||||
|
### 1. Create an app folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p offlineacademy/My_Courses offlineacademy/prisma
|
||||||
|
cd offlineacademy
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Download the Docker Compose file and environment template
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL -o docker-compose.yml https://raw.githubusercontent.com/nicetry247/offlineacademy/main/docker-compose.hub.yml
|
||||||
|
curl -fsSL -o .env https://raw.githubusercontent.com/nicetry247/offlineacademy/main/.env.example
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Create the SQLite database file
|
||||||
|
|
||||||
|
```bash
|
||||||
|
touch prisma/dev.db
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Start OfflineAcademy
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Open:
|
||||||
|
|
||||||
|
```text
|
||||||
|
http://localhost:6767
|
||||||
|
```
|
||||||
|
|
||||||
|
For another device on your LAN, replace `localhost` with your server IP:
|
||||||
|
|
||||||
|
```text
|
||||||
|
http://YOUR_SERVER_IP:6767
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker Hub Image
|
||||||
|
|
||||||
|
OfflineAcademy is published on Docker Hub:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://hub.docker.com/r/nicetry247/offlineacademy
|
||||||
|
```
|
||||||
|
|
||||||
|
Available tags:
|
||||||
|
|
||||||
|
```text
|
||||||
|
nicetry247/offlineacademy:latest
|
||||||
|
nicetry247/offlineacademy:1.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Direct pull:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull nicetry247/offlineacademy:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Other Deployment Options
|
||||||
|
|
||||||
|
### Build locally from source with Docker
|
||||||
|
|
||||||
|
Use this if you want to modify the app and build your own image locally.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/nicetry247/offlineacademy.git
|
||||||
|
cd offlineacademy
|
||||||
|
cp .env.example .env
|
||||||
|
mkdir -p My_Courses prisma
|
||||||
|
touch prisma/dev.db
|
||||||
|
docker compose up --build -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### Local Node.js development
|
||||||
|
|
||||||
|
Use this for development, debugging, or source-level customization.
|
||||||
|
|
||||||
|
#### Prerequisites
|
||||||
|
|
||||||
- Node.js 18+ recommended
|
- Node.js 18+ recommended
|
||||||
- npm
|
- npm
|
||||||
- A folder containing your course videos
|
- A folder containing your course videos
|
||||||
|
|
||||||
### 1. Clone the repository
|
#### 1. Clone the repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/YOUR_USERNAME/offlineacademy.git
|
git clone https://github.com/nicetry247/offlineacademy.git
|
||||||
cd offlineacademy
|
cd offlineacademy
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Create your environment file
|
#### 2. Create your environment file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
@@ -189,22 +281,20 @@ NEXT_PUBLIC_APP_URL="http://localhost:6767"
|
|||||||
QUIZAPI_KEY=""
|
QUIZAPI_KEY=""
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Install dependencies
|
#### 3. Install dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm ci
|
npm ci
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4. Prepare the database
|
#### 4. Prepare the database
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx prisma generate
|
npx prisma generate
|
||||||
npx prisma db push
|
npx prisma db push
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Add courses
|
#### 5. Add courses
|
||||||
|
|
||||||
Create a course folder:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p My_Courses
|
mkdir -p My_Courses
|
||||||
@@ -212,81 +302,13 @@ mkdir -p My_Courses
|
|||||||
|
|
||||||
Place your course folders inside `My_Courses`.
|
Place your course folders inside `My_Courses`.
|
||||||
|
|
||||||
### 6. Build and run
|
#### 6. Build and run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
npx next start -p 6767
|
npx next start -p 6767
|
||||||
```
|
```
|
||||||
|
|
||||||
Open:
|
|
||||||
|
|
||||||
```text
|
|
||||||
http://localhost:6767
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Docker Deployment
|
|
||||||
|
|
||||||
Docker is the recommended deployment path for most users.
|
|
||||||
|
|
||||||
### Option A: Use the Docker Hub image
|
|
||||||
|
|
||||||
OfflineAcademy is published on Docker Hub:
|
|
||||||
|
|
||||||
```text
|
|
||||||
https://hub.docker.com/r/nicetry247/offlineacademy
|
|
||||||
```
|
|
||||||
|
|
||||||
Available image tags:
|
|
||||||
|
|
||||||
```text
|
|
||||||
nicetry247/offlineacademy:latest
|
|
||||||
nicetry247/offlineacademy:1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
Users can run OfflineAcademy without building from source:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mkdir -p offlineacademy/My_Courses offlineacademy/prisma
|
|
||||||
cd offlineacademy
|
|
||||||
curl -fsSL -o docker-compose.yml https://raw.githubusercontent.com/nicetry247/offlineacademy/main/docker-compose.hub.yml
|
|
||||||
curl -fsSL -o .env https://raw.githubusercontent.com/nicetry247/offlineacademy/main/.env.example
|
|
||||||
touch prisma/dev.db
|
|
||||||
docker compose pull
|
|
||||||
docker compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
Or pull the image directly:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull nicetry247/offlineacademy:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
Open:
|
|
||||||
|
|
||||||
```text
|
|
||||||
http://localhost:6767
|
|
||||||
```
|
|
||||||
|
|
||||||
For LAN access, replace `localhost` with your server IP:
|
|
||||||
|
|
||||||
```text
|
|
||||||
http://YOUR_SERVER_IP:6767
|
|
||||||
```
|
|
||||||
|
|
||||||
### Option B: Build locally from source
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/nicetry247/offlineacademy.git
|
|
||||||
cd offlineacademy
|
|
||||||
cp .env.example .env
|
|
||||||
mkdir -p My_Courses prisma
|
|
||||||
touch prisma/dev.db
|
|
||||||
docker compose up --build -d
|
|
||||||
```
|
|
||||||
|
|
||||||
### Custom Course Folder
|
### Custom Course Folder
|
||||||
|
|
||||||
You can store courses anywhere on the host. Update your Compose file and map your folder to `/app/My_Courses` inside the container:
|
You can store courses anywhere on the host. Update your Compose file and map your folder to `/app/My_Courses` inside the container:
|
||||||
@@ -316,8 +338,10 @@ Maintainers can publish manually:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker login
|
docker login
|
||||||
docker build -t nicetry247/offlineacademy:latest .
|
docker build --no-cache -t nicetry247/offlineacademy:latest .
|
||||||
|
docker tag nicetry247/offlineacademy:latest nicetry247/offlineacademy:1.0.0
|
||||||
docker push nicetry247/offlineacademy:latest
|
docker push nicetry247/offlineacademy:latest
|
||||||
|
docker push nicetry247/offlineacademy:1.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also automate Docker Hub publishing later with GitHub Actions. To do that, add repository secrets for:
|
You can also automate Docker Hub publishing later with GitHub Actions. To do that, add repository secrets for:
|
||||||
|
|||||||
Reference in New Issue
Block a user