Skip to content

Commit

Permalink
Merge pull request #54 from cmason3/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
cmason3 authored Dec 29, 2024
2 parents 7e3d3f3 + 68e2652 commit 50b4e18
Show file tree
Hide file tree
Showing 14 changed files with 628 additions and 119 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
## CHANGELOG

### [25.1.0] - Dec 29, 2024
- Added support for nested templates within `template.j2` using Jinja2 include syntax
- Added support for encrypted DataTemplates using Vaulty (ChaCha20-Poly1305 encryption)
- Fixed a cosmetic issue where the button bar would visibily change size when loading a DataTemplate
- With password protected DataTemplates the prompt will now specify whether it needs the "Open" or "Modify" password
- Removed the `dt_hash` field within saved DataTemplates as it wasn't being used for anything
- You can no longer add the same DataSet using differences between uppercase and lowercase characters
- The DataSet dropdown is now sorted alphabetically with "Default" always on top
- Added the ability to remove protection from a DataTemplate after it has been added
- We no longer update the modify time of local repository files on access
- Don't output timestamp when running via systemd
- Updated Pandoc to 3.6.1 in Dockerfile

### [24.12.1] - Dec 3, 2024
- Fixed an issue where rows with an incorrect number of fields in `data.csv` weren't being coloured red

Expand Down Expand Up @@ -351,6 +364,8 @@
### 21.11.0 - Nov 29, 2021
- Initial release


[25.1.0]: https://github.com/cmason3/jinjafx_server/compare/24.12.1...25.1.0
[24.12.1]: https://github.com/cmason3/jinjafx_server/compare/24.12.0...24.12.1
[24.12.0]: https://github.com/cmason3/jinjafx_server/compare/24.10.1...24.12.0
[24.10.1]: https://github.com/cmason3/jinjafx_server/compare/24.10.0...24.10.1
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
 
<h1 align="center">JinjaFx Server - Jinja2 Templating Tool</h1>

JinjaFx Server is a lightweight web server that provides a Web UI to JinjaFx. It is a separate Python module which imports the "jinjafx" module to generate outputs from a web interface - it does require the "requests" module which isn't in the base install. Usage instructions are provided below, although it is considered an additional component and not part of the base JinjaFx tool, although it is probably a much easier way to use it.
JinjaFx Server is a lightweight web server that provides a Web UI to JinjaFx. It is a separate Python module which imports the "jinjafx" module to generate outputs from a web interface. Usage instructions are provided below, although it is considered an additional component and not part of the base JinjaFx tool, although it is probably a much easier way to use it. There is an AWS hosted version available at https://jinjafx.io, which is free to use and will always be running the latest development version.

### Installation

Expand Down Expand Up @@ -45,7 +45,31 @@ Once JinjaFx Server has been started with the `-s` argument then point your web

For health checking purposes, if you specify the URL `/ping` then you should get an "OK" response if the JinaFx Server is up and working (these requests are omitted from the logs).

The preferred method of running the JinjaFx Server is with HAProxy in front of it as it supports TLS termination and HTTP/2 (and more recently HTTP/3 using QUIC) or using a container orchestration tool like Kubernetes - please see the [/kubernetes](/kubernetes) directory for more information about running JinjaFx using Kubernetes.
The preferred method of running the JinjaFx Server is with HAProxy in front of it as it supports TLS termination and HTTP/2 (and more recently HTTP/3 using QUIC) or using a container orchestration tool like Kubernetes - please see the [/kubernetes](/kubernetes) directory for more information about running JinjaFx as a container.

If you don't want to go down the container route then you can also install it as a service using systemd - the following commands will install a Python Virtual Environment in `/opt/jinjafx` and start it via systemd:

```
sudo python3 -m venv /opt/jinjafx
sudo /opt/jinjafx/bin/python3 -m pip install jinjafx_server lxml
sudo tee /etc/systemd/system/jinjafx.service >/dev/null <<-EOF
[Unit]
Description=JinjaFx Server
[Service]
Environment="VIRTUAL_ENV=/opt/jinjafx"
ExecStart=/opt/jinjafx/bin/python3 -u -m jinjafx_server -s -l 127.0.0.1 -p 8080
SyslogIdentifier=jinjafx_server
TimeoutStartSec=60
Restart=always
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable --now jinjafx
```

The "-r", "-s3" or "-github" arguments (mutually exclusive) allow you to specify a repository ("-r" is a local directory, "-s3" is an AWS S3 URL and "-github" is a GitHub repository) that will be used to store DataTemplates on the server via the "Get Link" and "Update Link" buttons. The generated link is guaranteed to be unique and a different link will be created every time - version 1.3.0 changed the behaviour, where previously the same link was always generated for the same DataTemplate, but this made it difficult to update DataTemplates without the link changing as it was basically a cryptographic hash of your DataTemplate. If you use an AWS S3 bucket then you will also need to provide some credentials via the two environment variables which has read and write permissions to the S3 URL.

Expand Down
Loading

0 comments on commit 50b4e18

Please sign in to comment.