Skip to content

update compose file#126

Merged
GURMEHAR-PEC merged 3 commits intoPEC-CSS:mainfrom
Savy011:savy/compose
Dec 31, 2025
Merged

update compose file#126
GURMEHAR-PEC merged 3 commits intoPEC-CSS:mainfrom
Savy011:savy/compose

Conversation

@Savy011
Copy link
Contributor

@Savy011 Savy011 commented Dec 30, 2025

This PR fixes the race-condition where the backends start before the db container, resulting in the backend panicking and exiting early.

what does this do?

  • add health check for db server
  • start backend only after the health-check for db passes
    • add a restart so that the backend keeps re-starting itself in case of errors (unless stopped by the user)
  • create a network bridge to connect backend and db
  • remove exposing db's network ports.
  • move database and smtp credentials to .env file instead of hardcoding.
  • update readme to include frontend development instructions

how to test?

  • Compose file changes
    1. clone the repo
    2. checkout savy/compose branch
    3. set required env vars
    4. run docker compose up to run the container.
      • Optionally pass the -d flag to run the container in daemon mode.
    5. the backend should be running and listen for requests at port 8080
  • README updates
    1. just open the readme and check For Frontend Development (Docker) section

Copy link
Contributor

@GURMEHAR-PEC GURMEHAR-PEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, approved

@GURMEHAR-PEC GURMEHAR-PEC merged commit c868f8d into PEC-CSS:main Dec 31, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants