eoc-backend
https://github.com/coreybutler/nvm-windows
nvm install 16.18.0
nvm use 16.18.0
npm install
npm install -g @nestjs/cli
Create a file named .env; use the .env.sample file as a template. For each of the following steps adjust the
port numbers, database names, credentials etc. and fill them in the corresponding place in the .env file.
https://hub.docker.com/_/postgres
docker run -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=cloudmanager -p 5432:5432 --name "cloudmanager-postgres" -d postgres
https://hub.docker.com/_/redis
docker run -p 6379:6379 --name "cloudmanager-redis" -d redis
Add 127.0.0.1 radiantlogic-local.com at the end of the hosts file C:\Windows\System32\drivers\etc\hosts




Note: For Google OAuth, the email address must be present in the Test users list on the OAuth Consent Screen configuration.

Note: The application needs to be multi-tenant.
client id

create new client secret

git config core.hooksPath .githooks
Setup an environment variable (in the .env file) for provisioning an admin account [email protected]. See the .env.sample file for more details and additional admin configuration options.
Run either of the following commands:
npm run startnpm run start:devnpm run start:debugOpen your browser pointing to http://radiantlogic-local.com:3000/ to see the Swagger UI.
On every startup of the application the database schema will be updated by running the migrations, or you can manually execute them by running
npm run typeorm:cli -- migration:run.
https://orkhan.gitbook.io/typeorm/docs/migrations
You may find that synchronizing the schema is easier when developing npm run typeorm:cli -- schema:sync.
https://orkhan.gitbook.io/typeorm/docs/faq#how-do-i-update-a-database-schema
Use an SQL client to insert a user in the database, with the email address that you want to login with.
You can launch a terminal in your postgres container and run:
psql -U postgres
\c cloudmanager;INSERT INTO "user" ("email", "admin") VALUES ('your-email-here', true);Grafana is required for the application to run correctly
Steps for setting up grafana:
docker build -t grafana-eoc -f .\alertmanager\Grafana.dockerfile .\alertmanager\ docker run -d --name grafana -p 3008:3000 grafana-eocNOTE: You can replace default url for grafana in .env file
npx typeorm-ts-node-commonjs migration:create /backend-workspace/src/migrations/addIsWhitelistActive
Content type
Image
Digest
sha256:ce74d9734…
Size
352.2 MB
Last updated
3 days ago
docker pull radiantone/eoc-backend:dev-opt