diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-03-01 16:20:28 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-03-01 16:20:28 +0100 |
commit | 92ce74d92e5fe57e59cefcf454373c1a26022cf6 (patch) | |
tree | d01eccd6a7eba4de2679b468d2c0f734d7c807fd | |
parent | fcfffa47accad303bd9d927502396d8e4174c234 (diff) | |
download | web-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.tar web-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.tar.zst web-template-92ce74d92e5fe57e59cefcf454373c1a26022cf6.zip |
Update Buildsystem
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | README.md | 52 | ||||
-rw-r--r-- | actix/Makefile | 12 | ||||
-rw-r--r-- | example_settings.json | 14 | ||||
-rw-r--r-- | systemd/webtemplate.service.jinja2 | 14 |
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 + @@ -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 - |