This is yet another Pomodoro-technique-inspired app, for task&time tracking.
STATUS (2018-09): not stable (at all!)
- Clone this repo
- Install pnpm globally:
npm i -g pnpm - Run
pnpm installthennpx lerna bootstrap
If you intend to run this on your computer or on a server, you'll need:
- Node.js (tested with 8.x)
- MySQL (tested with 5.7)
That's pretty much it!
- Create a MySQL database for the app, a user with privileges on that database if need be (example in
back/sql/init.sql) - Inject
back/schema/schema.sqlinto that database - Copy
back/credentials.sample.jstoback/credentials.jsand edit the latter, according to your DB setup - In both
backandfront, runnpm install
- Start server with
npm startfromback(you may setPORTto a custom port,5000is the default) - Start client with
npm startfromfront(changeproxyinpackage.jsonif you changed the server's port)
buildscript key andengines(example) inpackage.jsondotenv- Serve the front app from backend (already done)
- Scope lerna start to only start backend app in production: lerna exec, lerna run and scoping
- Basic auth, depending on existence of env vars. Configure express-basic-auth with challenge
Sources:
dokku apps:create app-name
2. Install Dokky MySQL plugin
To be done once only
sudo dokku plugin:install https://github.com/dokku/dokku-mysql.git mysql
dokku mysql:create myappdb
dokku mysql:link myappdb app-name
BEWARE, you don't have to use the DB_* vars from env, but DATABASE_URL, e.g.: mysql://mysql:863504e9c117e833@dokku-mysql-myappdb:3306/myappdb
Inject a dump to populate the DB. e.g.:
dokku mysql:import traktdb < trakt-20200106.sql
Set environment variables, e.g. for Basic Auth:
dokku config:set trakt AUTH_USER=foo AUTH_PASS=bar
Push the project to Dokku
git remote add dokku dokku@subdomain.dokku.me:app-name
git push dokku master