Update documentation

pull/193/head
alse 3 years ago
parent 3f9a582fe6
commit 9a4e5d6bb5

@ -1,5 +1,5 @@
# docker run -d -p 8000:8000 alseambusher/crontab-ui
FROM alpine:3.13.5
FROM alpine:3.15.3
ENV CRON_PATH /etc/crontabs

@ -1,4 +1,4 @@
VER=0.3.15
VER=0.3.16
release:
sed -i '' "s/version\": \".*/version\": \"$(VER)\",/" package.json

@ -52,6 +52,17 @@ If you need to autosave your changes to crontab directly:
crontab-ui --autosave
### List of ennvironment variables supported
- HOST
- PORT
- BASE_URL
- CRON_DB_PATH
- CRON_PATH
- BASIC_AUTH_USER, BASIC_AUTH_PWD
- SSL_CERT, SSL_KEY
- ENABLE_AUTOSAVE
## Docker
You can use crontab-ui with docker. You can use the prebuilt images in the [dockerhub](https://hub.docker.com/r/alseambusher/crontab-ui/tags)
```bash

@ -3,6 +3,7 @@ var express = require('express');
var app = express();
var crontab = require("./crontab");
var restore = require("./restore");
var package_json = require('./package.json');
var moment = require('moment');
var basicAuth = require('express-basic-auth');
var http = require('http');
@ -269,7 +270,7 @@ server.listen(app.get('port'), app.get('host'), function() {
});
// If --autosave is used then we will also save whatever is in the db automatically without having to mention it explictly
// we do this by watching log file and setting a on change hook to it
if (process.argv.includes("--autosave")){
if (process.argv.includes("--autosave") || process.env.ENABLE_AUTOSAVE) {
crontab.autosave_crontab(()=>{});
fs.watchFile(crontab.crontab_db_file, () => {
crontab.autosave_crontab(()=>{
@ -300,5 +301,5 @@ server.listen(app.get('port'), app.get('host'), function() {
}
var protocol = startHttpsServer ? "https" : "http";
console.log("Crontab UI is running at " + protocol + "://" + app.get('host') + ":" + app.get('port') + base_url);
console.log("Crontab UI (" + package_json.version + ") is running at " + protocol + "://" + app.get('host') + ":" + app.get('port') + base_url);
});

Loading…
Cancel
Save