README.md 909 Bytes
Newer Older
Carlo Landmeter's avatar
Carlo Landmeter committed
1
# aports-turbo
Carlo Landmeter's avatar
Carlo Landmeter committed
2

Carlo Landmeter's avatar
Carlo Landmeter committed
3 4
Alpine Linux package database written in Lua.

Carlo Landmeter's avatar
Carlo Landmeter committed
5
This application makes use of the [Turbo](http://turbolua.org) (Lua) framework.
Carlo Landmeter's avatar
Carlo Landmeter committed
6

7
On Alpine Linux it should be enough to install turbo and deps by: 
Carlo Landmeter's avatar
Carlo Landmeter committed
8

Carlo Landmeter's avatar
Carlo Landmeter committed
9 10 11 12 13 14 15 16 17 18
apk add luajit lua5.1 lua-turbo lua-sqlite lua-lustache lua-socket

Copy config.sample.lua to config.lua and edit it.
You can start the application by starting ./aporst.lua or on Alpine Linux with turbo's init.d (see conf.d/turbo for settings)

#### Creating/updating the database

aports-turbo uses an sqlite database which is generated (check config to init tables) and updated by import.lua found in the tools directory. import.lua needs to be run from the root of aports-turbo project. You can for example run it from cron by creating a file like:

/etc/periodic/15min/alpine-turbo
19

Carlo Landmeter's avatar
Carlo Landmeter committed
20 21
```shell
#!/bin/sh
Carlo Landmeter's avatar
Carlo Landmeter committed
22

Carlo Landmeter's avatar
Carlo Landmeter committed
23
webdir="/var/www/aports-turbo"
Carlo Landmeter's avatar
Carlo Landmeter committed
24

Carlo Landmeter's avatar
Carlo Landmeter committed
25 26
cd $webdir && luajit tools/import.lua > /dev/null 2>&1
```