This repository was archived by the owner on Jun 4, 2024. It is now read-only.
File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
const { execSync } = require ( 'child_process' )
2
2
3
3
try {
4
- console . log ( 'Running Prisma migrations ...' )
4
+ console . log ( 'Generating Prisma Client ...' )
5
5
execSync ( 'npx prisma generate' , { stdio : 'inherit' } )
6
+
7
+ console . log ( 'Running Prisma migrations...' )
6
8
execSync ( 'npx prisma migrate deploy' , { stdio : 'inherit' } )
7
9
console . log ( 'Prisma migrations completed successfully.' )
8
10
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
+
2
3
echo " Bem-vindo ao EduPrime Hub!"
3
4
echo " Aguardando a inicialização do banco de dados..."
4
- sleep 20
5
+
6
+ # Verifica se o banco de dados está acessível antes de prosseguir
7
+ node check-db-connection.js
8
+
9
+ # Gera o cliente Prisma
10
+ npx prisma generate
11
+
12
+ # Aplica as migrações do Prisma
13
+ node prisma-init.js
14
+
5
15
echo " As APIs estão disponíveis na porta 3000."
6
- node check-db-connection.js && pnpm run start:prod
16
+
17
+ # Inicia o servidor
18
+ npm run start:prod
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ services:
10
10
POSTGRES_PASSWORD : ${POSTGRES_PASSWORD}
11
11
POSTGRES_HOST_AUTH_METHOD : trust
12
12
ports :
13
- - ' ${POSTGRES_PORT} :5432'
13
+ - ' 5432 :5432'
14
14
volumes :
15
15
- eduprimedb_data:/var/lib/postgresql/data
16
16
healthcheck :
@@ -20,7 +20,7 @@ services:
20
20
retries : 5
21
21
22
22
eduprime_core :
23
- image : softagon/eduprimecore:0.1
23
+ image : softagon/eduprimecore:latest
24
24
container_name : eduprime-core
25
25
env_file :
26
26
- .env
You can’t perform that action at this time.
0 commit comments