refac: rethought the complete workflow and deployement flow ; docs etc.
This commit is contained in:
1 parent
4a6209a8db
commit
09bd5afa4a
26 files changed
+800
-334
No files matched your search
@@ -1,66 +1,43 @@
|
||||
# RenewCMS
|
||||
|
||||
## 🚧 This project is under development !
|
||||
A small self-hosted CMS: a Go API and a Vue 3 admin/front SPA, shipped as **a single executable** backed by a SQLite file.
|
||||
|
||||
The features are not complete, not fully tested and subject to many changes.
|
||||
> 🚧 **Under development.** Features are incomplete, not fully tested and subject to change.
|
||||
|
||||
## Setup
|
||||
## Quick start
|
||||
|
||||
Don't forget to setup the [Environment variables](#environment-variables)!
|
||||
### Run a release binary
|
||||
|
||||
### Use with Docker
|
||||
|
||||
#### Compose
|
||||
|
||||
The easiest way to run the project is to use docker-compose.
|
||||
You still need to set up the environment variables, but you can use the `.env` file for that.
|
||||
Note that some supplementary variables are required for docker-compose to work, like `DOCKER_DB_FOLDER`.
|
||||
|
||||
```bash
|
||||
docker compose up --build -d
|
||||
```sh
|
||||
cp .env.example .env # fill in PUBLIC_URL, JWT_SECRET and SMTP_*
|
||||
./renewcms # → http://localhost:8080
|
||||
```
|
||||
|
||||
### Build and run it yourself
|
||||
Data is stored in `./data/` by default. For a real server (systemd, HTTPS, backups), see **[docs/deployment.md](docs/deployment.md)**.
|
||||
|
||||
#### Build
|
||||
### Develop
|
||||
|
||||
There are 2 scripts to build the project:
|
||||
Requires Go 1.25+, Node.js 22, [Bun](https://bun.sh) and [Task](https://taskfile.dev).
|
||||
|
||||
- `super_build.sh`
|
||||
- `super_build.bat`
|
||||
```sh
|
||||
cp .env.example .env
|
||||
task setup
|
||||
task dev # API with hot reload + Vite HMR → http://localhost:5173
|
||||
```
|
||||
|
||||
They will build the project for windows, linux and macOS. The binaries will be in the `bin` folder.
|
||||
You can also really just use `go build` to build the project for your current OS.
|
||||
## Documentation
|
||||
|
||||
#### Run
|
||||
|
||||
Once the project is built, you can simply run the binary for your OS. Setting the environment variables is
|
||||
of course required, but not necessarily via the `.env` file.
|
||||
|
||||
### Environment variables
|
||||
|
||||
| Name | Type | Description | Comment |
|
||||
|----------------------|--------|:----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
|
||||
| ENVIRONMENT | string | environment the API is running in | required, `development` or `production` |
|
||||
| HOST | string | the host domain name for emails and callbacks | required, if `localhost`: add the port (e.g. `localhost:8080`) |
|
||||
| PORT | int | port the API will use | required |
|
||||
| JWT_SECRET | string | secret for the jwt auth | required |
|
||||
| CORS_ALLOWED_ORIGINS | string | allowed origins for CORS | required, semicolon separated list |
|
||||
| DB_FILE | string | path to the sqlite db file | required, can be at the root but name still required (e.g. `./RenewCMS.db`) ; have to end up with `.db` |
|
||||
| DOCKER_DB_FOLDER | string | path to the sqlite db file's folder | required with docker, this will basically be the host machine folder (e.g. `./data`) that contains the sqlite db file |
|
||||
| SMTP_EMAIL | string | sender email | required |
|
||||
| SMTP_PASSWORD | string | smtp account password | required |
|
||||
| SMTP_HOST | string | smtp server address | required |
|
||||
| SMTP_PORT | int | smtp server port | required |
|
||||
| Doc | Contents |
|
||||
|---|---|
|
||||
| [docs/development.md](docs/development.md) | Dev setup, how Vite and the API fit together, tests, lint, `task` commands |
|
||||
| [docs/deployment.md](docs/deployment.md) | Building release binaries, running as a service, HTTPS, backups, upgrades |
|
||||
| [docs/configuration.md](docs/configuration.md) | Every environment variable |
|
||||
| [docs/architecture.md](docs/architecture.md) | Backend layering and how the SPA is embedded |
|
||||
|
||||
## API Usage
|
||||
|
||||
TODO
|
||||
|
||||
## Demo
|
||||
|
||||
TODO
|
||||
|
||||
## TODOs
|
||||
|
||||
- Cancel button when email validation pending or expired
|
||||
Reference in new issue
Block a user