Skip to content

Commit

Permalink
fix exit code detection
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Oct 5, 2024
1 parent 6eebec8 commit d1081e0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ ENV PORT=3000

EXPOSE 3000

ENTRYPOINT ["dumb-init", "--"]
CMD dockerize -wait tcp://${DB_HOST}:5432 -timeout 60s \
&& npx sequelize db:migrate --config dist/config/database.js --migrations-path dist/database/migrations \
&& ./scripts/load-retrieved.sh /retrieved \
&& if [ $? -eq 1 ]; then npm run mark-seeds; exit 0; elif [ $? -ge 100 ]; then sleep 30; exit 1; fi \
&& ./scripts/load-retrieved.sh /retrieved; exit_code=$? \
&& if [ $exit_code -eq 1 ]; then npm run mark-seeds; exit 0; elif [ $exit_code -ge 100 ]; then exit 1; fi \
&& npx sequelize db:seed:all --config dist/config/database.js --seeders-path dist/database/seeds \
&& node dist/server.js

0 comments on commit d1081e0

Please sign in to comment.