Novaconium
Getting started
Novaconium ships as a self-contained Docker image. You provide a project directory for your pages, styles, and configuration; the image provides Apache, PHP, and the framework.
Requirements
- Docker (Engine 20.10 or newer).
Get The Docker Image Running
# CREATE DIRECTORIES
PROJECTDIR="YourProjectName"
mkdir -p "$PROJECTDIR"/novaconium/{App/pages,cache,uploads,data}
# Pull the image
docker pull git.4lt.ca/4lt/novaconium:2.0.0-beta
# Run the container
docker run -d \
--name novaconium \
-p 8080:80 \
-v "$(pwd)/${PROJECTDIR}/novaconium/App:/var/www/html/App" \
-v "$(pwd)/${PROJECTDIR}/novaconium/cache:/var/www/html/public/cache" \
-v "$(pwd)/${PROJECTDIR}/novaconium/uploads:/var/www/html/public/uploads" \
-v "$(pwd)/${PROJECTDIR}/novaconium/data:/var/www/html/data" \
git.4lt.ca/4lt/novaconium:2.0.0-beta
The site is now on http://localhost:8080.
Using Docker Compose
For anything beyond a quick try, a compose.yml keeps the mounts
and image tag in one place, for example:
services:
web:
image: git.4lt.ca/4lt/novaconium:2.0.0-beta
ports:
- "8080:80"
volumes:
- ./:/var/www/html/App
- ./css:/var/www/html/public/css
- ./novaconium/cache:/var/www/html/public/cache
- ./novaconium/uploads:/var/www/html/public/uploads
- ./novaconium/data:/var/www/html/data
docker compose up -d
Also see the project's docker compose file.
Create a Page
Add a page under the pages/ directory by pasting the following into index.twig:
{% extends layout %}
{% block title %}Hello World!{% endblock %}
{% block description %}Boldly go where no one has gone before.{% endblock %}
{% block content %}
<p>Hello World! These are the voyages...</p>
{% endblock %}
If you want to add an about page, create pages/about/index.twig:
{% extends layout %}
{% block title %}About Us{% endblock %}
{% block description %}Guess where we have been.{% endblock %}
{% block content %}
<p>Where no one has gone before.</p>
{% endblock %}