Skip to content

Commit

Permalink
▲ feat: add prisma and environements to the template
Browse files Browse the repository at this point in the history
  • Loading branch information
Pape Mayel Diagne THIAM authored and Pape Mayel Diagne THIAM committed May 24, 2024
1 parent f335938 commit 24a4765
Show file tree
Hide file tree
Showing 11 changed files with 571 additions and 672 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ prisma/migrations
#env
.env
#swagger docs
./public
public
#vscode
.vscode
#db persistance
pg_db
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.5"
services:

pgdb:
image: postgres:16
container_name: db-senwata
hostname: postgres_db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=senwata
- POSTGRES_HOST_AUTH_METHOD=trust
expose:
- 5432
ports:
- 5435:5432/tcp
volumes:
- "./pg_db:/var/lib/postgresql/data"



12 changes: 12 additions & 0 deletions env/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
NODE_ENV=development
PORT=3000
API_URL=http://localhost:3000

# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://postgres:postgres@localhost:5435/senwata"
12 changes: 12 additions & 0 deletions env/.env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
NODE_ENV=production
PORT=3000
API_URL=http://localhost:3000

# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://postgres:postgres@localhost:5435/senwata"
Loading

0 comments on commit 24a4765

Please sign in to comment.