Sign inSign up

mjacadiz/os-blog

By mjacadiz

•Updated 9 months ago

Create your blog easily with OS-Blog

Image
Web servers
Content management system
3

3.0K

mjacadiz/os-blog repository overview

⁠OS Blog - Modern Blogging Platform

OS Blog is a modern, feature-rich blogging platform designed for developers and content creators. It includes a responsive frontend, a robust backend, and a PostgreSQL database for data persistence.

⁠Features:

  • Frontend: Built with Angular, providing a responsive and user-friendly interface.
  • Backend: Powered by NestJS, offering a scalable and secure API.
  • Database: PostgreSQL for reliable data storage.
  • Authentication: JWT-based for secure user sessions.
  • Customizable: Easily configurable environment variables for deployment.

⁠Quick Start

To quickly start the OS Blog system with persistent data, use the following command:

docker run -d \
  --name os-blog \
  -p 80:80 \
  -v os-blog-database-data:/var/lib/postgresql/data \
  -v os-blog-static-files:/var/www/static \
  -e POSTGRES_PASSWORD="your_secure_password" \
  -e JWT_SECRET="your_jwt_secret_32_chars_minimum" \
  mjacadiz/os-blog:latest
  • Replace your_secure_password with a strong password for the PostgreSQL database.
  • Replace your_jwt_secret_32_chars_minimum with a secure JWT secret (minimum 32 characters).

Access the blog at: http://localhost⁠


⁠Advanced Configuration

⁠Expose PostgreSQL Port

To expose the PostgreSQL database port for external access, use the following command:

docker run -d \
  --name os-blog \
  -p 80:80 \
  -p 5432:5432 \
  -v os-blog-database-data:/var/lib/postgresql/data \
  -v os-blog-static-files:/var/www/static \
  -e POSTGRES_PASSWORD="your_secure_password" \
  -e JWT_SECRET="your_jwt_secret_32_chars_minimum" \
  -e POSTGRES_DB="open_blog" \
  -e POSTGRES_USER="blog_user" \
  mjacadiz/os-blog:latest
  • The database will be accessible on localhost:5432.

⁠Custom Ports

To run the blog on a custom port, specify the desired port:

docker run -d \
  --name os-blog \
  -p 8080:80 \
  -v os-blog-database-data:/var/lib/postgresql/data \
  -v os-blog-static-files:/var/www/static \
  -e POSTGRES_PASSWORD="your_secure_password" \
  -e JWT_SECRET="your_jwt_secret_32_chars_minimum" \
  mjacadiz/os-blog:latest

Access the blog at: http://localhost:8080⁠


⁠Environment Variables

VariableDescriptionDefault Value
POSTGRES_PASSWORDPassword for the PostgreSQL database (required)
JWT_SECRETSecret key for JWT authentication (required)
POSTGRES_DBName of the PostgreSQL databaseopen_blog
POSTGRES_USERPostgreSQL usernameblog_user
PORTPort for the blog application80
CORS_ORIGINSAllowed origins for CORShttp://localhost
BASE_URLBase URL for the applicationhttp://localhost

⁠Limitations

⁠Horizontal Scaling

OS Blog uses a contained instance of PostgreSQL, which makes horizontal scaling challenging. If you require horizontal scaling, at the moment this solution is not prepared to allow setting up an external database service. (We plan to make this feature in the near future)


⁠Notes:

  • Security: Ensure strong passwords and secrets for production deployments.
  • First Startup: The first startup may take a few minutes as the database initializes.
  • Logs: View logs using docker logs os-blog -f.

For more details, visit the GitHub repository⁠.

Tag summary

Content type

Image

Digest

sha256:a7d6552cd…

Size

186 MB

Last updated

10 months ago

docker pull mjacadiz/os-blog