Skip to content

Latest commit

 

History

History
69 lines (63 loc) · 4.46 KB

INSTALL.md

File metadata and controls

69 lines (63 loc) · 4.46 KB

WatchList can be set up to run as a regular web application or a Progressive Web Application (PWA). It can be run with or without Docker.

Set up WatchList

  1. Check out the source and go to the root directory of the project.
  2. Edit config\default.json and fill in the following values:
    • If you plan on using SQLite database, fill in the "SQLite" section. Create a username and password and use "WatchList" as the database name.
    • If you plan on using SQL Server as the database, fill in the "SQLServer" section
    • Secret: Create a long and secure password to encrypt your database
  3. Run npm install
  4. Run npm run build
  5. Run npm run start
  6. Visit http://localhost:3000 in your browser. You should see the page to set up a new account.
  7. Enter the following fields:
    • Name: Name of the new admin
    • Username: New user name
    • Password: Password that is complex. The password requirements are:1 lowercase alphabetical character, 1 uppercase alphabetical character, 1 numeric, 1 special char, 8 chars long minimum.
  8. Create the new account. You should see a message that the account creation was successfull. You should now be redirected back to the Login page. If not go to http://YOURIP:8080/Login.
  9. Login using the credentials that you created above.

Docker setup

  1. Follow the instructions above but stop after running npm run build.
  2. Build the Docker image: docker buildx build . -t watchlist.
  3. Edit docker-compose.yml and update the network name to match your Docker network. You can create a docker network if you haven't done so already with the command docker network create YourNetworkName.
  4. Build the Docker container: docker-compose up -d.

Setting up WatchList database for SQL Server (Optional: Skip this step if you want to use the default SQLite3 database)

  1. Create database with the name WatchList in SQL Server.
  2. Edit setup\SQL\Setup.sql and set the master key encryption password (write down this password in case you forget it!!)
  3. Run the SQL script SQL\Setup.sql on the database WatchList as a user with db_creator permission. All of the commands should complete without any errors.
  4. Create user account: Edit setup\SQL\CreateUser.sql and set the username, realname and password
  5. Run the SQL script setup\SQL\CreateUser.sql
  6. If you ever want to change a users' password, use the SQL at setup\SQL\SetPassword.sql

PWA Files

  1. If you want use WatchList as a PWA, make sure you should have the following files/folders in the build folder. If any of these files or folders are missing copy them from the public folder:
    • assets
    • favicon.ico
    • manifest.json
    • maskable.png
    • service-worker.js
  2. After update WatchList, clear the browser cache in Google Chrome.

Build WatchList Desktop app using Electron

  1. Build the web app using the instructions above.
  2. Build the Desktop app for your OS:
    • Windows: Open a command prompt and run build-desktop-app.bat.
    • Linux: Open Terminal and run build-desktop-app-linux.sh.
    • Mac: Open Terminal and run build-desktop-app-mac.sh.
  3. When you run the app, you should see the WatchList login screen. If you see a blank screen, there is an easy way to fix this by editing index.html:
    • Windows
      1. Open to the folder where the WatchList app is located. You should see watchlist.exe
      2. Index.html is located at resources\app\index.html
    • Linux
      1. Open Terminal and go to the directory where the WatchList app is located. You should see watchlist.
      2. Index.html is located at resources/app/index.html
    • Mac:
      1. Open Terminal and go to the directory where the WatchList app is located. You should see watchlist.app.
      2. Index.html is located at watchlist.app/Contents/Resources/app/index.html
  4. Make sure that the line that loads bundle.js reads <script src="./bundle.js"> not <script src="/dist/bundle.js"> .
  5. Re-run watchlist after saving index.html

Resetting SQLite password for the admin account

If you cannot log into WatchList, you can reset the password directly in the database for the admin account that was created when you first set up WatchList.

  1. Install SQLite for your operating system
  2. Go to the directory where the watchlist database file is located
  3. sqlite3 watchlistdb.sqlite
  4. Run UPDATE Users SET Password='U2FsdGVkX18kOsqQBr1pTD01Xl7T+aPG7EQCl14pzLc=' SET WHERE UserID=1;
  5. Log into WatchList with the password "watchlist" without quotes.
  6. Go to the admin section and change your password