0.7.1 • Published 6 years ago

@udia/udia v0.7.1

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

UDIA

Travis Codecov David

You are one with the universe.

UDIA

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_HOST127.0.0.1SQL Hostname
SQL_DBudiadbSQL Database name (test: udiadbtest)
SQL_PORT5432SQL Port Number for serving
SQL_TEST_DBudiadbtestSQL Database name for testing
SQL_TEST_PORT5433SQL Port number for testing
DATABASE_URLdriver://user:pw@host:port/db(Optional) Shorthand for SQL_* non test fields
JWT_SECRETDEVELOPMENT_SECRETSecret string to use for JWT encryption
JWT_ALGORITHMHS256Signing algorithm to use for JWT
JWT_EXPIRES_IN7dHow long the JWT should be valid for
CORS_ORIGINhttp://127.0.0.1:3001OPTIONS Res Header for Access-Control-Allow-Origin
CLIENT_DOMAINNAME127.0.0.1:3001Domain:port of client (udia.ca)
CLIENT_PROTOCOLhttpProtocol of Client (https)
EMAIL_TOKEN_TIMEOUT3600000How long should an email token last in ms
FROM_EMAILnoreply@udia.caEmail to use for from field
REPLY_TO_EMAIL_NAMEAlexander WongName to use for reply-to field
REPLY_TO_EMAIL_ADDRalex@udia.caEmail to use for reply-to field
SMTP_USERNAMExxlvhieo2gqp352o@ethereal.emailSMTP Username (ethereal default)
SMTP_PASSWORDrCJTErmv6v2uacmdRtSMTP Password
SMTP_HOSTsmtp.ethereal.emailSMTP Host (ethereal default)
SMTP_PORT587SMTP Port
HEALTH_METRIC_INTERVAL500How often to send health metric
DEV_JWT(optional) Set Dev /graphiql passHeader jwt
AWS_ACCESS_KEY_ID(optional) Use AWS SDK for email instead of SMTP
AWS_SECRET_ACCESS_KEY(optional) If two fields are set, will ignore SMTP
AWS_SES_REGIONus-west-2The region for Amazon's SES service
ITEMS_PAGE_LIMIT32Items page size maximum value
USERS_PAGE_LIMIT32Users page size maximum value

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/>.