1+ ![ Gitcontainer] ( docs/image.png )
2+
13# Gitcontainer 🐳
24
35** Turn any GitHub repository into a production-ready Docker container with AI-powered Dockerfile generation.**
@@ -54,33 +56,6 @@ Gitcontainer is an AI-powered web application that automatically generates produ
54565 . ** Open your browser:**
5557 Navigate to ` http://localhost:8000 `
5658
57- ## 🐳 Docker Deployment
58-
59- ### Build and run with Docker:
60-
61- ``` bash
62- # Build the image
63- docker build -t gitcontainer .
64-
65- # Run the container
66- docker run -p 8000:8000 -e OPENAI_API_KEY=your_api_key gitcontainer
67- ```
68-
69- ### Using docker-compose:
70-
71- ``` yaml
72- version : ' 3.8'
73- services :
74- gitcontainer :
75- build : .
76- ports :
77- - " 8000:8000"
78- environment :
79- - OPENAI_API_KEY=your_openai_api_key_here
80- volumes :
81- - ./repos:/app/repos # Persist cloned repositories
82- ` ` `
83-
8459## 🛠️ How It Works
8560
86611 . ** Repository Cloning** : Gitcontainer clones the GitHub repository locally using Git
@@ -112,27 +87,7 @@ cyclotruc-gitcontainer/
11287 └── gitingest.py # Repository analysis
11388```
11489
115- ## 🔧 API Reference
116-
117- ### WebSocket Streaming
118-
119- Connect to ` /ws/{session_id} ` for real-time generation updates:
120-
121- ``` javascript
122- const ws = new WebSocket (' ws://localhost:8000/ws/session_123' );
123- ws .onmessage = (event ) => {
124- const data = JSON .parse (event .data );
125- console .log (data .type , data .content );
126- };
127- ```
128-
129- ### Health Check
130-
131- ``` bash
132- curl http://localhost:8000/health
133- ```
134-
135- ## 🎛️ Configuration
90+ ## 🔧 Configuration
13691
13792### Environment Variables
13893
@@ -171,36 +126,6 @@ result = asyncio.run(generate_dockerfile("https://github.com/user/repo"))
171126print (result[' dockerfile' ])
172127```
173128
174- ## 🤝 Contributing
175-
176- We welcome contributions! Here's how to get started:
177-
178- 1 . Fork the repository
179- 2 . Create a feature branch: ` git checkout -b feature-name `
180- 3 . Make your changes and test them
181- 4 . Commit with clear messages: ` git commit -m "Add feature X" `
182- 5 . Push to your fork: ` git push origin feature-name `
183- 6 . Open a Pull Request
184-
185- ### Development Setup
186-
187- ``` bash
188- # Install development dependencies
189- pip install -r requirements.txt
190-
191- # Run with auto-reload
192- uvicorn app:app --host 0.0.0.0 --port 8000 --reload
193- ```
194-
195- ## 🧪 Testing
196-
197- Test with example repositories:
198-
199- - ** Simple Python app** : ` https://github.com/cyclotruc/gitingest `
200- - ** This project** : ` https://github.com/cyclotruc/gitcontainer `
201- - ** Complex Node.js app** : Any Express.js repository
202- - ** Multi-service app** : Repositories with multiple services
203-
204129## 🎨 Customization
205130
206131### Adding Custom Instructions
@@ -212,46 +137,6 @@ Use the "Additional instructions" feature to customize generation:
212137- ` "Optimize for production deployment" `
213138- ` "Add development tools for debugging" `
214139
215- ### Extending Technology Support
216-
217- Add new technology detection in ` tools/create_container.py ` :
218-
219- ``` python
220- # Add your technology patterns to the AI prompt
221- technology_patterns = {
222- " rust" : [" Cargo.toml" , " src/main.rs" ],
223- " ruby" : [" Gemfile" , " app.rb" , " config.ru" ],
224- # Add more...
225- }
226- ```
227-
228- ## 🐛 Troubleshooting
229-
230- ### Common Issues
231-
232- ** "OPENAI_API_KEY not found"**
233- - Ensure your ` .env ` file contains the API key
234- - Check that the environment variable is properly set
235-
236- ** "Failed to clone repository"**
237- - Verify the GitHub URL is correct and public
238- - Check your internet connection
239- - Ensure Git is installed on your system
240-
241- ** "Generation timeout"**
242- - Large repositories may take longer to process
243- - Check your OpenAI API quota and limits
244-
245- ** Monaco Editor not loading**
246- - Ensure you have internet connection for CDN resources
247- - Check browser console for JavaScript errors
248-
249- ### Performance Tips
250-
251- - ** Large repositories** : Consider adding ` .gitignore ` patterns to exclude large files
252- - ** Private repositories** : Currently only public GitHub repositories are supported
253- - ** API limits** : Monitor your OpenAI API usage to avoid rate limits
254-
255140## 📝 License
256141
257142This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
0 commit comments