Giter VIP home page Giter VIP logo

pantheon's Introduction

Pantheon 2.x

Build Status Code Coverage

Pantheon 2 is a modular documentation management and publication system based on asciidoc and built on top of Apache sling.

Prerequsistes

Podman Buildah Java

Build the application

(All commands from here on will be assumed to be ran from the project's root directory)

./mvnw clean install

Unit Tests

./mvnw test

Run the application

The best way to run Pantheon is to install podman.

First, create a pod:

podman pod create --name pantheon -p 8080 -p 5005

This will create a pantheon pod with ports 8080 (for web access) and 5005 (for remote Java debugging) open.

Run a mongo database container in the pod.

podman run --pod pantheon --name slingmongo -d mongo

Build the pantheon docker image

buildah bud --layers -f container/Dockerfile -t pantheon-app .

Run the sling container pod in the pod.

podman run --pod pantheon -d -e SLING_OPTS='-Dsling.run.modes=oak_mongo -Doak.mongo.uri=mongodb://localhost:27017' --name pantheon-app pantheon-app

The Sling launchpad can be accessed at http://localhost:8080 and you can log in to it using the admin/admin username password combo.

Live deploy of code

This is useful when developing the application. To deploy the code live to a running application, all you have to do is

./mvnw clean package sling:install -pl pantheon-bundle

This will install the code in this project on the running Sling instance, where it can be previewed and modified.

Using the application

Head to http://localhost:8080/pantheon for the application's entry point.

For sling's management UI, you can head to http://localhost:8080/starter/index.html

You can stop and start the pod as necessary with podman's pod command:

podman pod stop pantheon
podman pod start pantheon

Other use cases...

Run the container without Mongo, but this will result in the data being destroyed with the container.

podman run --rm -p 8080:8080  YOURTAG

Open a terminal inside the container and debug

get the container process

podman ps
podman exec -it PROCESS bash

Developing the frontend code

If making modifications that are entirely contained within the frontend, it is not necessary to use maven to rebuild and redeploy the package on every change.

These instructions provide an imperfect-but-workable shortcut that can accelerate development.

cd pantheon/frontend
yarn start

NOTE: It will likely be necessary to increase your inotify limit to ensure that yarn is able to detect changes in every project file. If you are running into issues with yarn not automatically detecting saved changes, run the following command (its effects are permenent):

echo fs.inotify.max_user_watches=65535 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
chromium-browser --disable-web-security --user-data-dir=/home/user/anywhere/chromeDev/ &

This works because there is code in app.tsx that preempts all fetch() calls and checks if the app is being served from localhost. If so, it modifies the request to point to localhost:8080 specifically, rather than localhost:9000 which is where webpack-dev-server serves the frontend code from.

It might be possible to improve this technique. Suggestions are welcome.

End user documentation

The source for the end user documentation is stored in /pantheon-bundle/src/main/resources/SLING-INF/content/docs/.

pantheon's People

Contributors

benradey avatar jmarrero avatar xdavidson avatar ankkit24 avatar adahms avatar aprajshekhar avatar carlosmunoz avatar stoobie avatar wesruv avatar anknite avatar anarang avatar emarcusrh avatar rednitish avatar theashiot avatar

Watchers

James Cloos avatar

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.