summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2021-03-01 16:20:28 +0100
committerxengineering <mail2xengineering@protonmail.com>2021-03-01 16:20:28 +0100
commit92ce74d92e5fe57e59cefcf454373c1a26022cf6 (patch)
treed01eccd6a7eba4de2679b468d2c0f734d7c807fd
parentfcfffa47accad303bd9d927502396d8e4174c234 (diff)
downloadweb-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.tar
web-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.tar.zst
web-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.zip
Update Buildsystem
-rw-r--r--Makefile13
-rw-r--r--README.md52
-rw-r--r--actix/Makefile12
-rw-r--r--example_settings.json14
-rw-r--r--systemd/webtemplate.service.jinja214
5 files changed, 25 insertions, 80 deletions
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 <project_name> # default <project_name> is webtemplate
-curl http://localhost:<framework_port>/ # default <framework_port> is 28472
-```
-
-**Make sure to not edit settings.json until you uninstalled the project!**
-
-You can remove it like this:
-
-```
-sudo systemctl stop <project_name> # default <project_name> 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
-