Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyvor/hyvor-blogs-docker
Docker image for hosting a blog with Hyvor Blogs (based on Laravel)
https://github.com/hyvor/hyvor-blogs-docker
Last synced: 27 days ago
JSON representation
Docker image for hosting a blog with Hyvor Blogs (based on Laravel)
- Host: GitHub
- URL: https://github.com/hyvor/hyvor-blogs-docker
- Owner: hyvor
- Created: 2024-11-18T05:14:56.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-19T05:25:12.000Z (about 1 month ago)
- Last Synced: 2024-11-27T06:47:23.912Z (28 days ago)
- Language: PHP
- Size: 48.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## hyvor-blogs-docker
This repository contains a Docker image for serving a blog with [Hyvor Blogs](https://blogs.hyvor.com).
- [Docs](https://blogs.hyvor.com/docs/subdirectory)
- [Docker Hub](https://hub.docker.com/r/hyvor/hyvor-blogs-docker)### Usage
```bash
docker run -d \
-e BLOG_SUBDOMAIN=your-blog \
-e BLOG_HOSTING_PATH=/blog \
-e BLOG_DELIVERY_API_KEY=your-api-key \
-e BLOG_WEBHOOK_SECRET=your-webhook-secret \
-p 8080:80 \
hyvor/hyvor-blogs-docker
````hyvor/hyvor-blogs-docker` exposes port `80` by default. You can map it to any port on your host machine. See below for the list of environment variables. With the above command, your blog will be available at `http://localhost:8080/blog`. You can run a reverse proxy like Nginx to serve it at `https://your-domain.com/blog`.
## Environment Variables
- Blog (supports comma-separated values for multiple blogs):
- `BLOG_SUBDOMAIN`: The subdomain of the blog. Required.
- `BLOG_HOSTING_PATH`: The path where the blog is hosted. Default: `/`.
- `BLOG_DELIVERY_API_KEY`: The API key of the blog. Required.
- `BLOG_WEBHOOK_SECRET`: The webhook secret of the blog. Required.- Laravel
- `APP_ENV` - The environment of the Laravel application. Default: `production`.
- `APP_DEBUG` - Whether to enable debugging. Default: `false`.
- `CACHE_STORE` - The cache store to use. Default: `file`.
- In addition, you can set any other Laravel environment variables like Redis, MySQL, etc.- PHP
- `PHP_MAX_CHILDREN` - Number of PHP-FPM children to spawn. Default: `16`. Increase this if you have a high traffic website.## Examples
### Multiple Blogs with ENV File
Create a file named `.env` with the following content:
```bash
BLOG_SUBDOMAIN=blog1,blog2
BLOG_HOSTING_PATH=/blog1,/blog2
BLOG_DELIVERY_API_KEY=api-key-1,api-key-2
BLOG_WEBHOOK_SECRET=webhook-secret-1,webhook-secret-2
```Run the following command:
```bash
docker run -d --env-file .env -p 8080:80 hyvor/hyvor-blogs-docker
```