From 92ce74d92e5fe57e59cefcf454373c1a26022cf6 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 1 Mar 2021 16:20:28 +0100 Subject: Update Buildsystem --- Makefile | 13 ++++++++++ README.md | 52 -------------------------------------- actix/Makefile | 12 +++++++++ example_settings.json | 14 ---------- systemd/webtemplate.service.jinja2 | 14 ---------- 5 files changed, 25 insertions(+), 80 deletions(-) create mode 100644 Makefile create mode 100644 actix/Makefile delete mode 100644 example_settings.json delete mode 100644 systemd/webtemplate.service.jinja2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3da8a07 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +# vim: tabstop=4 shiftwidth=4 noexpandtab + +debug: + make -C actix debug + +release: + make -C actix release + +all: release + +clean: + make -C actix clean + diff --git a/README.md b/README.md index 9b544e3..e5672e1 100644 --- a/README.md +++ b/README.md @@ -4,55 +4,3 @@ A template project for mixed static / dynamic web applications. - -## Expected Environment - -- GNU/Linux -- systemd -- Git, make and python3 are installed - - -## Current State - -This project is in **early development** state. Please be very careful. The scripts behind the make targets will install and uninstall files on your system without checking for existing files. This means that existing files from other sources could be overwritten or deleted. Have a look at the ```Makefile``` and ```manage.py``` for details. - - -## Usage - -You can run this example or a web service based on this example like this: - -``` -git clone https://gitea.xengineering.eu/xengineering/web-template.git -cd web-template -nano settings.json # tweak to your needs -make all -make install -sudo systemctl start # default is webtemplate -curl http://localhost:/ # default is 28472 -``` - -**Make sure to not edit settings.json until you uninstalled the project!** - -You can remove it like this: - -``` -sudo systemctl stop # default is webtemplate -make uninstall -make clean -``` - -You can also make your own project based on web-template: - -``` -git clone https://gitea.xengineering.eu/xengineering/web-template.git myproject -cd myproject -git remote rename origin template -``` - -You can then get updates from this template repository: - -``` -git fetch template -git merge template/master -``` - diff --git a/actix/Makefile b/actix/Makefile new file mode 100644 index 0000000..b815ebe --- /dev/null +++ b/actix/Makefile @@ -0,0 +1,12 @@ +# vim: tabstop=4 shiftwidth=4 noexpandtab + +debug: + cargo build + ./target/debug/actix + +release: + cargo build --release + +clean: + cargo clean + diff --git a/example_settings.json b/example_settings.json deleted file mode 100644 index 8e2f7ac..0000000 --- a/example_settings.json +++ /dev/null @@ -1,14 +0,0 @@ - -{ - "project_name":"webtemplate", - "project_description":"A Template Web Application", - - "webroot":"/srv/http", - - "framework":"flask", - "framework_port":"28472", - "framework_bind":"127.0.0.1", - "user":"http", - "group":"http" -} - diff --git a/systemd/webtemplate.service.jinja2 b/systemd/webtemplate.service.jinja2 deleted file mode 100644 index f1aa9c5..0000000 --- a/systemd/webtemplate.service.jinja2 +++ /dev/null @@ -1,14 +0,0 @@ - -[Unit] -Description={{ project_description }} -After=network.target - -[Service] -User={{ user }} -Group={{ group }} -WorkingDirectory=/opt/{{ project_name }}/ -ExecStart=/opt/{{ project_name }}/{{ project_name }} - -[Install] -WantedBy=multi-user.target - -- cgit v1.2.3-70-g09d2