Skip to content

Add Docker and CI Support#4461

Open
CloCkWeRX wants to merge 4 commits intodevfrom
add-docker-and-ci-support-2313436152704642708
Open

Add Docker and CI Support#4461
CloCkWeRX wants to merge 4 commits intodevfrom
add-docker-and-ci-support-2313436152704642708

Conversation

@CloCkWeRX
Copy link
Collaborator

This PR introduces full containerization support for the Rails application.

Changes:

  • Dockerfile: Uses a ruby:3.3.8-bullseye base image. It includes all necessary system dependencies, handles gem and JS package installation, and performs asset precompilation for production.
  • Docker Compose: Sets up the application with its primary dependencies:
    • web: The Rails application.
    • db: PostgreSQL 17, using existing initialization scripts.
    • elasticsearch: Elasticsearch 7.4.0, matching the version required by the application.
  • CI/CD: A new GitHub Actions workflow automates the building and publication of the Docker image to the GitHub Container Registry (GHCR) whenever changes are pushed to the dev branch.
  • Entrypoint: A script ensures that stale Rails server PIDs are cleared before the container starts.

These changes provide a consistent development and production-like environment and automate the container image lifecycle.


PR created automatically by Jules for task 2313436152704642708 started by @CloCkWeRX

- Added a production-ready `Dockerfile` based on Ruby 3.3.8-bullseye.
- Added `entrypoint.sh` to handle Rails server PID cleanup.
- Added `.dockerignore` to optimize build context.
- Added `docker-compose.yml` for local orchestration of Rails, PostgreSQL 17, and Elasticsearch 7.4.0.
- Added GitHub Actions workflow in `.github/workflows/docker-build-push.yml` to build and push the image to GHCR on pushes to the `dev` branch.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant