mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
Rename root folders
This commit is contained in:
@@ -1,18 +1,18 @@
|
|||||||
# Stage 1: Build the frontend
|
# Stage 1: Build the frontend
|
||||||
FROM node:20 AS frontend-builder
|
FROM node:20 AS frontend-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY frontend/package*.json ./
|
COPY app/package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
COPY frontend .
|
COPY app .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Build the backend
|
# Stage 2: Build the backend
|
||||||
FROM golang:1.23 AS backend-builder
|
FROM golang:1.23 AS backend-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apt-get update && apt-get install -y gcc musl-dev
|
RUN apt-get update && apt-get install -y gcc musl-dev
|
||||||
COPY backend/go.mod backend/go.sum ./
|
COPY server/go.mod server/go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY backend .
|
COPY server .
|
||||||
RUN CGO_ENABLED=1 GOOS=linux go build -o novamd ./cmd/server
|
RUN CGO_ENABLED=1 GOOS=linux go build -o novamd ./cmd/server
|
||||||
|
|
||||||
# Stage 3: Final stage
|
# Stage 3: Final stage
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -25,7 +25,7 @@ Set the following environment variables:
|
|||||||
- `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package
|
- `CGO_ENABLED=1`: This is necessary for the go-sqlite3 package
|
||||||
- `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db")
|
- `NOVAMD_DB_PATH`: Path to the SQLite database file (default: "./sqlite.db")
|
||||||
- `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data")
|
- `NOVAMD_WORKDIR`: Directory for storing Markdown files (default: "./data")
|
||||||
- `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../frontend/dist")
|
- `NOVAMD_STATIC_PATH`: Path to the frontend build files (default: "../app/dist")
|
||||||
- `NOVAMD_PORT`: Port to run the server on (default: "8080")
|
- `NOVAMD_PORT`: Port to run the server on (default: "8080")
|
||||||
- `NOVAMD_ADMIN_EMAIL`: Admin user email
|
- `NOVAMD_ADMIN_EMAIL`: Admin user email
|
||||||
- `NOVAMD_ADMIN_PASSWORD`: Admin user password
|
- `NOVAMD_ADMIN_PASSWORD`: Admin user password
|
||||||
@@ -39,7 +39,7 @@ openssl rand -base64 32
|
|||||||
|
|
||||||
## Running the Backend
|
## Running the Backend
|
||||||
|
|
||||||
1. Navigate to the `backend` directory
|
1. Navigate to the `server` directory
|
||||||
2. Ensure all environment variables are set
|
2. Ensure all environment variables are set
|
||||||
3. Run the server:
|
3. Run the server:
|
||||||
```
|
```
|
||||||
@@ -48,7 +48,7 @@ openssl rand -base64 32
|
|||||||
|
|
||||||
## Running the Frontend
|
## Running the Frontend
|
||||||
|
|
||||||
1. Navigate to the `frontend` directory
|
1. Navigate to the `app` directory
|
||||||
2. Install dependencies:
|
2. Install dependencies:
|
||||||
```
|
```
|
||||||
npm install
|
npm install
|
||||||
@@ -61,14 +61,14 @@ openssl rand -base64 32
|
|||||||
|
|
||||||
## Building for Production
|
## Building for Production
|
||||||
|
|
||||||
1. Build the frontend:
|
1. Build the frontend app:
|
||||||
```
|
```
|
||||||
cd frontend
|
cd app
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
2. Build the backend:
|
2. Build the backend:
|
||||||
```
|
```
|
||||||
cd backend
|
cd server
|
||||||
go build -o novamd ./cmd/server
|
go build -o novamd ./cmd/server
|
||||||
```
|
```
|
||||||
3. Set the `NOVAMD_STATIC_PATH` environment variable to point to the frontend build directory
|
3. Set the `NOVAMD_STATIC_PATH` environment variable to point to the frontend build directory
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ func DefaultConfig() *Config {
|
|||||||
return &Config{
|
return &Config{
|
||||||
DBPath: "./novamd.db",
|
DBPath: "./novamd.db",
|
||||||
WorkDir: "./data",
|
WorkDir: "./data",
|
||||||
StaticPath: "../frontend/dist",
|
StaticPath: "../app/dist",
|
||||||
Port: "8080",
|
Port: "8080",
|
||||||
RateLimitRequests: 100,
|
RateLimitRequests: 100,
|
||||||
RateLimitWindow: time.Minute * 15,
|
RateLimitWindow: time.Minute * 15,
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user