0.2.1 • Published 6 years ago

udia v0.2.1

Weekly downloads
10
License
AGPL-3.0
Repository
github
Last release
6 years ago

UDIA

Travis Coveralls github David David

You are one with the universe.

./logo.svg

Quickstart

Clone Repo: git clone git@github.com:udia-software/udia.git && cd udia

Docker

Docker mode is the staging environment.
  1. Start the application with docker-compose up

Manual

Manual is reccommended for live reloading and development.
  1. Ensure you have a sql database accessible and ready. (postgres supported)
    • You can use docker! docker-compose -f dev-compose.yml up and the defaults env variables all work.
    • To view raw database, connect to docker container with psql -h 0.0.0.0 -p 5432 -U pguser -d udiadb
  2. Set your database connection values. (see Environment Variables)
  3. Install dependencies: yarn install
  4. Run database migrations yarn runMigrations
  5. Watch application: yarn watch or run application yarn start or test application yarn test

Environment Variables

These environment variables can be set by modifying your ~/.*rc or ~/.*profile files. Alternatively, modify the environment variables in the docker-compose files.

Environment Variable NameDefault ValueDescription
NODE_ENVdevelopmentNode Environment
PORT3000Express port
TYPEORM_TYPEpostgresDatabase (postgres officially supported)
TYPEORM_LOGGINGtrueLog SQL queries to console
SQL_USERpguserSQL User
SQL_PASSWORDmysecretpasswordSQL Password
SQL_HOSTlocalhostSQL Hostname
SQL_PORT5432SQL Port Number for serving
SQL_DBudiadbSQL Database name (test: udiadbtest)
SQL_TEST_PORT5433SQL Port number for testing
SQL_TEST_DBudiadbtestSQL Database name for testing
JWT_SECRETDEVELOPMENT_SECRETSecret string to use for JWT encryption
CORS_ORIGINhttp://localhost:3001OPTIONS Res Header for Access-Control-Allow-Origin
CLIENT_DOMAINNAMElocalhost:3001Domain:port of client (udia.ca)
CLIENT_PROTOCOLhttpProtocol of Client (https)
EMAIL_TOKEN_TIMEOUT3600000How long should an email token last
SMTP_USERNAMExxlvhieo2gqp352o@ethereal.emailSMTP Username (ethereal default)
SMTP_PASSWORDrCJTErmv6v2uacmdRtSMTP Password
SMTP_HOSTsmtp.ethereal.emailSMTP Host (ethereal default)
SMTP_PORT587SMTP Port
REDIS_URLredis://localhost:6379Redis Connection String
HEALTH_METRIC_INTERVAL500How often to send health metric
DEV_JWT""Test/Dev/graphiql` passHeader jwt

License

This is free software, licensed under GNU Affero General Public License v3 (AGPL-3.0).

Copyright (C) 2018 Alexander Wong <alex@udia.ca>, Udia Software Incorporated

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.