-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75ee1c0
commit 85c09f8
Showing
21 changed files
with
174 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,7 @@ lib-cov | |
|
||
.idea | ||
.vercel | ||
|
||
dev/.db-migrated | ||
dev/data/db | ||
dev/data/pg4admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ main() | |
.finally(async () => { | ||
await db.$disconnect() | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
db_migrated_file="dev/.db-migrated" | ||
|
||
rm -R dev/data/{db,pg4admin} | ||
rm $db_migrated_file |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
version: "3.7" | ||
|
||
services: | ||
bde_app: | ||
container_name: bde_app | ||
image: node:14 | ||
restart: always | ||
working_dir: /usr/app | ||
volumes: | ||
- ..:/usr/app | ||
networks: | ||
- bde-isima-dev | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- DATABASE_URL=postgres://bde_isima:isima@bde_db:5432/bde_db | ||
- LYDIA_API_VENDOR_ID=5f620bc31bb31257392056 | ||
- NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000 | ||
- NEXT_PUBLIC_LYDIA_API_URL=https://homologation.lydia-app.com | ||
- NEXT_PUBLIC_LYDIA_API_VENDOR_TOKEN=5f620bc30f2d6214421546 | ||
- SMTP_HOST=smtp.gmail.com | ||
- SMTP_PORT=465 | ||
- SMTP_USER=bde.isima.webmaster | ||
- [email protected] | ||
- SMTP_PASSWORD=fehdwsntbftacqpj | ||
entrypoint: sh -c | ||
command: ./dev/start-dev.sh | ||
|
||
bde_db: | ||
container_name: bde_db | ||
restart: always | ||
image: postgres:latest | ||
environment: | ||
- POSTGRES_PASSWORD=isima | ||
- POSTGRES_USER=bde_isima | ||
- POSTGRES_DB=bde_db | ||
- PGDATA=/var/lib/postgresql/data | ||
volumes: | ||
- ./data/db:/var/lib/postgresql/data | ||
networks: | ||
- bde-isima-dev | ||
ports: | ||
- "5432:5432" | ||
|
||
bde_pg4admin: | ||
container_name: bde_pg4admin | ||
restart: always | ||
image: dpage/pgadmin4:latest | ||
environment: | ||
- [email protected] | ||
- PGADMIN_DEFAULT_PASSWORD=admin | ||
volumes: | ||
- ./data/pg4admin:/var/lib/pgadmin | ||
ports: | ||
- 8080:80 | ||
networks: | ||
- bde-isima-dev | ||
|
||
networks: | ||
bde-isima-dev: | ||
name: bde-isima-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
db_migrated_file="dev/.db-migrated" | ||
|
||
set -e | ||
|
||
npm i | ||
|
||
if [ ! -f $db_migrated_file ] | ||
then | ||
npx blitz prisma migrate dev -n initial | ||
npx prisma db seed ./db/seeds/index.ts | ||
date > $db_migrated_file | ||
else | ||
echo "No migration needed" | ||
fi | ||
|
||
npm run dev |
Oops, something went wrong.