Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres DB stops running with exit code 1 in docker compose #245

Closed
kattasahan opened this issue May 28, 2024 · 6 comments · Fixed by #251
Closed

Postgres DB stops running with exit code 1 in docker compose #245

kattasahan opened this issue May 28, 2024 · 6 comments · Fixed by #251
Labels
help wanted Extra attention is needed priority: high released scope: general Anything related to this repository type: bug Something isn't working

Comments

@kattasahan
Copy link

Describe the bug
In Windows postgres db stops Running with Exit code 1 in Docker desktop.

To Reproduce
Steps to reproduce the behavior:

  1. Go to keyshade local repo (root folder)

  2. In CMD run

  • docker compose up -d
  • pnpm run db:generate-types
  • pnpm run db:deploy-migrations
  1. See error
C:\Repos\keyshade\apps\api:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  [email protected] db:deploy-migrations: `pnpx dotenv-cli -e ../../.env -- pnpx prisma migrate deploy --schema=src/prisma/schema.prisma`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Expected behavior
All commands should run successfully and user should be able to complete setup and run keyshade project successfully

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: NA
  • Version: NA

Additional context
Analysis:

  • Error is cause due to postgress db(container) is not available/not running

image

  • So i checked docker logs

image

  • found that current user doesn't have access to data in the container to put into local volume
@rajdip-b rajdip-b changed the title (Windows) postgres db stops Running with Exit code 1 Postgres DB stops running with exit code 1 in docker compose May 28, 2024
@rajdip-b rajdip-b added type: bug Something isn't working help wanted Extra attention is needed scope: general Anything related to this repository priority: high labels May 28, 2024
@Ratnesh2003
Copy link
Contributor

hey @kattasahan, can you add700 to the end of your volumes label under service db and try to check if it works?
Like this:

volumes:
      - ./data/db:/var/lib/postgresql/data 700

@rajdip-b
Copy link
Member

@kattasahan can you try the solution? See if it works?

@kattasahan
Copy link
Author

Yup!
It's working.

@Ratnesh2003
Copy link
Contributor

Perfect!! I'll raise a PR for this.

@rajdip-b
Copy link
Member

Many thanks bro!

@rajdip-b
Copy link
Member

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority: high released scope: general Anything related to this repository type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants