This repository contains a Docker image for serving a blog with Hyvor Blogs.
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-dockerhyvor/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.
-
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.
-
Caddy
LOG_LEVEL- The log level for Caddy. Default:INFOorERROR(default).
Create a file named .env with the following content:
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-2Run the following command:
docker run -d --env-file .env -p 8080:80 hyvor/hyvor-blogs-docker