File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,4 @@ COPY package.json ./
6
6
COPY package-lock.json ./
7
7
COPY . .
8
8
RUN npm install
9
- RUN npm run build
10
- CMD ["npm" , "run" , "preview" ]
9
+ RUN npm run build
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ services:
8
8
POSTGRES_USER : " ${POSTGRES_USER}"
9
9
POSTGRES_PASSWORD : " ${POSTGRES_PASSWORD}"
10
10
POSTGRES_DB : ${POSTGRES_DB}
11
- command : bash -c "npm run preview"
12
11
volumes :
13
12
- ./docker_test_db:/var/lib/postgresql/data
14
13
healthcheck :
@@ -24,7 +23,7 @@ services:
24
23
dockerfile : Dockerfile
25
24
ports :
26
25
- " 7999:8000"
27
- command : bash -c "npx prisma migrate dev && npx prisma db seed && npm start"
26
+ command : bash -c "npx prisma migrate reset --force && npm start"
28
27
environment :
29
28
DATABASE_URL : " ${DATABASE_URL}"
30
29
PORT : " ${PORT}"
@@ -36,6 +35,7 @@ services:
36
35
build :
37
36
context : ./client
38
37
dockerfile : Dockerfile
38
+ command : bash -c "npm run preview"
39
39
ports :
40
40
- " 4174:4173"
41
41
depends_on :
Original file line number Diff line number Diff line change @@ -411,8 +411,6 @@ async function main() {
411
411
async function init ( ) {
412
412
const users = await prisma . user . count ( ) ;
413
413
414
- console . log ( users )
415
-
416
414
if ( users === 0 ) {
417
415
main ( )
418
416
. then ( async ( ) => {
@@ -423,9 +421,10 @@ async function init() {
423
421
await prisma . $disconnect ( ) ;
424
422
process . exit ( 1 ) ;
425
423
} ) ;
424
+ console . log ( "Database is successully seeded" ) ;
426
425
} else {
427
426
console . log ( "Database seeding is not needed" ) ;
428
427
}
429
428
}
430
429
431
- init ( )
430
+ init ( ) ;
You can’t perform that action at this time.
0 commit comments