Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
thk-code-archPublic archive

About

API built with NestJs, Postgres

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

279 Commits

Folders and files

Repository files navigation

New Location

You can find the latest version of this project, along with other related projects, in our new monorepo:

https://github.com/thk-code-arch/intercom/

intercom-backend

API built with NestJS,Postgres, TypeORM

Installation

add docker-compose.yml

version: '3'
services:
  icweb-db:
    container_name: dev-icweb-db
    image: postgres:12
    volumes:
      - ./db:/var/lib/postgresql/data
    restart: always
    environment:
       - MYSQL_ROOT_PASSWORD=TOPSECRET
       - MYSQL_DATABASE=icweb
       - TZ=Europe/Berlin
  icweb-api:
    container_name: icweb-api
    restart: always
    build: ./builds/icweb-api/.
    environment:
      - TZ=Europe/Berlin
      - IC_Database=icweb
      - IC_DBPassword=TOPSECRET
      - IC_Secret=SUPER-SECRET
    volumes:
      - ./api:/usr/src/app
      - ./files:/files

Run DB migrations

# create typeorm config
npm run pretypeorm

# generate migration
npm run typeorm:migration:generate -- init

# update/init DB
npm run typeorm:migration:run

Add some dummy DATA

# seed some Data
npm run seed:run

Reinit DB

npm run schema:drop && npm run typeorm:migration:run && npm run seed:run

About

API built with NestJs, Postgres

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages