Skip to content
πŸš€ PowerCMS - Main package
TypeScript Shell Dockerfile HTML
Branch: master
Clone or download
Latest commit 314ddd5 Apr 30, 2019

README.md

PowerCMS

Build Status Coverage Status

PowerCMS is a Domain Driven, CQRS based CMS project in Microservices architecture, written for developers. Good architecture, code quality and fancy technologies will be always on the first place!

How to use?

git clone git@github.com:power-cms/power-cms.git
cd power-cms
cp .env.dist .env
docker-compose up

To run seeds, start the server, and then run the following command:

./seeds.sh

Packages

How to test?

npm test

Production

Here you have an example of production-ready docker-compose.yml file. It doesn't require cloning the repository, because it's fully dockerized.

version: "3.4"

services:
  api:
    image: powercms/power-cms
    environment:
      SERVICES: api
    networks: ["power-cms"]
    depends_on: ["nats", "mongodb"]
    ports: ["3000:3000"]
    labels:
      - "traefik.enable=true"
      - "traefik.backend=api"
      - "traefik.port=3000"
      - "traefik.frontend.entryPoints=http"
      - "traefik.frontend.rule=PathPrefix:/"

  site:
    image: powercms/power-cms
    environment:
      SERVICES: site
    networks: ["power-cms"]
    depends_on: ["nats", "mongodb"]

  user:
    image: powercms/power-cms
    environment:
      SERVICES: user
    networks: ["power-cms"]
    depends_on: ["nats", "mongodb"]

  auth:
    image: powercms/power-cms
    environment:
      SERVICES: auth
      ACCESS_TOKEN_SECRET: power-cms-access
      REFRESH_TOKEN_SECRET: power-cms-refresh
    networks: ["power-cms"]
    depends_on: ["nats", "mongodb"]

  settings:
    image: powercms/power-cms
    environment:
      SERVICES: settings
    networks: ["power-cms"]
    depends_on: ["nats", "mongodb"]

  mongodb:
    image: mongo:4
    networks: ["power-cms"]

  nats:
    image: nats
    networks: ["power-cms"]

  traefik:
    image: traefik
    command: --web --docker --docker.domain=docker.localhost --logLevel=INFO --docker.exposedbydefault=false
    networks:
      - power-cms
    ports:
      - "4001:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /dev/null:/traefik.toml

networks:
  power-cms:

To run seed in production use this one-liner script while your app is started:

docker run --rm -it --network=${PWD##*/}_power-cms powercms/power-cms sh -c "sh ./seeds-prod.sh"

License

Copyright Β© 2019 by Szymon Piecuch under ISC license.

You can’t perform that action at this time.