a-ariff / a-ariff/rust-selfhost-server

Fix Docker container exit issue

Open
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
Rust
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Problem

The Docker container exits with code 0 instead of running as a persistent server, indicating the service is stopping unexpectedly after startup.

Expected Behavior

  • Container should run continuously as a web server
  • Service should be accessible on port 3000
  • Container should restart automatically on failure

Proposed Solution

  • Add proper runtime configuration to Dockerfile
  • Implement healthchecks for container monitoring
  • Ensure proper signal handling in the Rust application
  • Add restart policies in docker-compose.yml

Acceptance Criteria

  • Container runs persistently without exiting
  • Healthcheck endpoint returns status
  • Service is accessible on configured port
  • Proper logging for troubleshooting
  • Container restarts automatically on failure

Technical Details

  • Review Dockerfile CMD/ENTRYPOINT configuration
  • Add healthcheck endpoint to Rust application
  • Configure proper signal handling for graceful shutdown
  • Update docker-compose.yml with restart policies and healthchecks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Dockerfile CMD/ENTRYPOINT configuration and the service settings in docker-compose.yml, then inspect the Rust application startup and shutdown handling. Verify the container stays running, serves on port 3000, exposes a working healthcheck, logs troubleshooting information, and restarts automatically after failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, rust
Domain
backend, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.