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

Add Dockerfile and CI workflow for Docker build #20

Merged
merged 6 commits into from
Dec 7, 2024

Conversation

siddharth7113
Copy link
Contributor

Pull Request:

This pull request addresses the implementation of a Dockerfile and a CI workflow to build and test the neso-solar-consumer application using Docker. The last command runs the neso_solar_consumer.app module, as requested.

Fixes: #13

Changes Made:

  1. Added a Dockerfile to create a lightweight Docker image:
    • Base image: python:3.12-slim.
    • Dependencies are installed using pip with requirements.txt.
    • Entry point defined as neso_solar_consumer.app.
  2. Created a CI workflow (docker-build.yml) in .github/workflows to:
    • Automatically build the Docker image on every push.
  3. Incorporated requirements.in, requirements.txt, and dev-requirements files for dependency management.

Note: This branch includes changes from issue #6, which is pending merge. These changes are necessary for testing the Docker build and running the application. Once #6 is merged, these changes will align with the main branch.


Testing:

  • Docker image successfully built locally using the command:
    docker build -t neso-solar-consumer .
  • The application runs as expected in the container:
    docker run --rm neso-solar-consumer

Checklist:

requirements.in Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
dev-requirements.in Outdated Show resolved Hide resolved
dev-requirements.txt Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@peterdudfield
Copy link
Contributor

Happy to merge?

@siddharth7113
Copy link
Contributor Author

Thanks for the review and approval, @peterdudfield! Everything is ready from my side—happy to proceed with the merge.

@peterdudfield peterdudfield merged commit 1b8bdb6 into openclimatefix:main Dec 7, 2024
2 checks passed
@peterdudfield
Copy link
Contributor

@all-contributors please add @siddharth7113 for infra

Copy link
Contributor

@peterdudfield

I've put up a pull request to add @siddharth7113! 🎉

@siddharth7113 siddharth7113 deleted the docker-deployment branch December 7, 2024 10:50
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