To run dev version with hot reload use:
docker compose -f docker-compose-dev.yml up -dTo see logs use:
docker compose logsIf you want to see them real-time use:
docker compose logs -fIn order to stop containers:
docker compose -f docker-compose-dev.yml downTo run specific service use first command with added service name like this:
docker compose -f docker-compose-dev.yml up {service name} -dList of services with env variables to configure your instance:
-
dev-db - database intended for development
-
To clear database please:
- stop db container
- delete folder postgres_data
- start db container
Variable name Description Default value DATABASE_USERWill create specific user in postgres postgresDATABASE_PASSWORDWill set password of created user 123DATABASE_NAMEName of db created in postgres nest -
dev-db-seed - seed database with test data
Variable name Description Default value DATABASE_HOSThostname of postgres dev-dbDATABASE_PORTport with postgres instance running 5432DATABASE_USERwhat user use to login postgresDATABASE_PASSWORDwhat password use to login 123DATABASE_NAMEwhich db to query nest -
initiatives-dev-api - this will start be
- prisma studio is running on port 5555
- in dev mode api is on /api/ route
Variable name Description Default value DATABASE_HOSThostname of postgres dev-dbDATABASE_PORTport with postgres instance running 5432DATABASE_USERwhat user use to login postgresDATABASE_PASSWORDwhat password use to login 123DATABASE_NAMEwhich db to query nestBE_API_PORTto what port BE will be mapped on host 8080⬆ Warn: WON'T change port of nest app inside container JWT_SECRETseed for JWT token super-secret -
initiatives-dev-client - this will start FE only
Variable name Description Default value BE_API_PORTto what port BE will be mapped on host 8080⬆ Warn: WON'T change port of nest app inside container BE_API_HOSTurl where BE is hosted `localhost FE_PORTPort on which to run dev client 3000⬆ Warn: this WILL change both exposed port and port of FE inside container
Frontend http://localhost:3000
Backend localhost:8080
Swagger localhost:8080/api
Prisma Studio localhost:5555
Dev postgresql localhost:5432 username postgres password 123
By default e2e tests will be ran on default docker compose up command You can modify it by:
- Specifying initiatives-api-test-watch
docker compose -f docker-compose-dev.yml up -d initiatives-api-test-watch - Specifying any other service(initiatives-api-test-watch is not dependency for any other services)