mirror of
https://github.com/psviderski/uncloud.git
synced 2026-11-10 20:54:17 +00:00
61 lines
1.3 KiB
Markdown
61 lines
1.3 KiB
Markdown
# Website
|
|
|
|
## Landing page
|
|
|
|
Landing page is a single static HTML file located at [`./landing/index.html`](./landing/index.html). It is built
|
|
using [Tailwind CSS](https://tailwindcss.com/).
|
|
|
|
### Local development
|
|
|
|
```shell
|
|
cd landing
|
|
open index.html
|
|
# Watch the Tailwind CSS class changes and rebuild style.css
|
|
npm run dev
|
|
```
|
|
|
|
## Docs and Blog
|
|
|
|
`/docs` and `/blog` are built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
|
|
|
### Local development
|
|
|
|
To preview the documentation website, install its dependencies first:
|
|
|
|
```shell
|
|
npm ci
|
|
```
|
|
|
|
Then start the local development server:
|
|
|
|
```shell
|
|
mise run docs:dev
|
|
```
|
|
|
|
It opens up a browser window at http://localhost:3000/. Most changes are reflected live without having to restart the
|
|
server.
|
|
|
|
## Deployment
|
|
|
|
Both the landing page and Docusaurus site are built into a single Docker image that runs Caddy web server to serve the
|
|
static files.
|
|
|
|
Before building a production image, test the build locally:
|
|
|
|
```shell
|
|
docker compose -f compose.local.yaml up --build
|
|
```
|
|
|
|
Verify:
|
|
|
|
* http://localhost:8000 — should show the landing page
|
|
* http://localhost:8000/docs/ — should show the docs generated by Docusaurus
|
|
* http://localhost:8000/blog/ — should show the blog generated by Docusaurus
|
|
|
|
### Deploy to production
|
|
|
|
```shell
|
|
make website-image-push
|
|
uc deploy
|
|
```
|