Giter Site home page Giter Site logo

simplex-cms's Introduction

simplex-cms

CMS reimplementing.

Migration steps

For the first milestone, basic documentation and basic CMS stuff.

Basic rearchitecture, focus in split into different services (CMS, ECommerce, Blog, etc)

Think about to use Git as persistence layer, to have versioning and branches out of the box. It is possible move stages into branches.

CMS stuff

  • Contents (ML1)
    • Content
    • Folder
    • Head
    • Templates
  • Documentation (ML1)

No CMS stuff

  • Security Access (ML9999)
    • Authentication
      • onlinelogin
      • onlinelogout
      • onlineregistration
      • regeneratepassword
      • registrationpassword
      • registrationupdate
    • Authorization
      • Organiza users per groups
      • Restric access per group and user
        • Per folder
        • Per resource
    • Forms

Layout

  • Folder data contains:
    • Statics resources
    • Custom components from pages with the format ${page_filename}_${component_name}.html Because it is in the some folder structure that the resources, is possible edit html or markdown files whe edition tools without special server interaction.
  • Folder meta contains metadata for static resources, folders, pages and components.
  • Folder templates contains data and metadata information about templates.

Layout Examples:

.
├── data
│   ├── blog
│   │   ├── 2015
│   │   │   └── 10
│   │   │       └── 04
│   │   │           └── post1
│   │   │               ├── post.html_head.html
│   │   │               ├── post.html_post-content-header.html
│   │   │               └── post.html_post-content.html
│   │   ├── index.html_post-content.html
│   │   └── rss.xml
│   ├── css
│   │   ├── application.css
│   │   ├── bootstrap.css
│   │   ├── bootstrap.min.css
│   │   ├── bootstrap-theme.css
│   │   └── bootstrap-theme.min.css
│   ├── fonts
│   │   ├── glyphicons-halflings-regular.eot
│   │   ├── glyphicons-halflings-regular.svg
│   │   ├── glyphicons-halflings-regular.ttf
│   │   ├── glyphicons-halflings-regular.woff
│   │   └── glyphicons-halflings-regular.woff2
│   ├── img
│   │   ├── avatar_qr.jpg
│   │   ├── delicious_logo.png
│   │   ├── GitHub_Logo.png
│   │   ├── se-logo.png
│   │   └── so-logo.png
│   ├── index.html
│   └── js
│       ├── bootstrap.js
│       ├── bootstrap.min.js
│       └── jquery-2.1.0.min.js
├── meta
│   ├── blog
│   │   ├── 2015
│   │   │   └── 10
│   │   │       └── 04
│   │   │           └── post1
│   │   │               ├── post.html_head.json
│   │   │               ├── post.html.json
│   │   │               ├── post.html_post-content-header.json
│   │   │               └── post.html_post-content.json
│   │   ├── index.html.json
│   │   ├── index.html_post-content.json
│   │   └── rss.xml.json
│   ├── css
│   │   ├── application.css.json
│   │   ├── bootstrap.css.json
│   │   ├── bootstrap.min.css.json
│   │   ├── bootstrap-theme.css.json
│   │   └── bootstrap-theme.min.css.json
│   ├── fonts
│   │   ├── glyphicons-halflings-regular.eot.json
│   │   ├── glyphicons-halflings-regular.svg.json
│   │   ├── glyphicons-halflings-regular.ttf.json
│   │   ├── glyphicons-halflings-regular.woff2.json
│   │   └── glyphicons-halflings-regular.woff.json
│   ├── img
│   │   ├── avatar_qr.jpg.json
│   │   ├── delicious_logo.png.json
│   │   ├── GitHub_Logo.png.json
│   │   ├── se-logo.png.json
│   │   └── so-logo.png.json
│   ├── index.html.json
│   └── js
│       ├── bootstrap.js.json
│       ├── bootstrap.min.js.json
│       └── jquery-2.1.0.min.js.json
└── templates
    └── blog
        ├── list-posts.html
        │   ├── data.html
        │   └── metadata.json
        └── post.html
            ├── data.html
            └── metadata.json

Deploy

git clone https://github.com/angelcervera/simplex-cms
sbt clean assembly
docker build -t simplexportal/simplex-cms .

To export and import the docker images:

docker save -o simplexportal-0.1-snapshot.tar simplexportal/simplex-cms
gzip -9 simplexportal-0.1-snapshot.tar

scp -r -P 62269 simplexportal-0.1-snapshot.tar.gz [email protected]:/root/.

docker load --input simplexportal-0.1-snapshot.tar.gz

Per every site, start the container on different port:

docker run -d --cpus 1 -m 1G -p <[host_ip:]host_port>:8080 --read-only -v <host_storage_path>:/root/storage --name acervera -it simplexportal/simplex-cms

Start a Nginx container as reverse proxy:

$ docker run -d --name nginx -v <local nginx.conf>:/etc/nginx/nginx.conf:ro -p 80:80 nginx

And the nginx.conf could be something like:

worker_processes 1;

events { worker_connections 1024; }

http {

    sendfile on;

    upstream upstream-domain1 {
        server 192.168.0.38:8081;
    }

    upstream upstream-domain2 {
        server 192.168.0.38:8082;
    }

    server {
        listen 80;
        server_name  domain1.org *.domain1.org;

        location / {
            proxy_pass         http://upstream-domain1;
            proxy_redirect     off;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;
        }
    }

    server {
        listen 80;
        server_name  domain2.org *.domain2.org;

        location / {
            proxy_pass         http://upstream-domain2;
            proxy_redirect     off;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;
        }
    }

}

Known limitations.

Notes

Woodstox posts:

Jackson:

Markup syntax:

Markup Languages

Markdown:

Git:

Ideas:

  • Use Doxia to be able to use different formats out of the box.
  • Use YAML instead JSON:

simplex-cms's People

Contributors

angelcervera avatar

Watchers

 avatar

simplex-cms's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.