Skip to content

Commit 03a2a0e

Browse files
committed
Update README and CI/CD workflows for Docker integration and Python package management
- Added detailed Docker instructions to the README for both development and production setups of the web application. - Removed outdated Docker instructions to streamline the documentation. - Updated CI/CD workflows to specify the working directory for Python package operations, ensuring correct execution of linting, testing, and security scans. - Adjusted paths for coverage and security report uploads in the CI/CD configuration to reflect the new directory structure.
1 parent 72e7412 commit 03a2a0e

3 files changed

Lines changed: 37 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,36 @@ jobs:
2929
python-version: ${{ matrix.python-version }}
3030

3131
- name: Install dependencies
32+
working-directory: packages/python
3233
run: |
3334
python -m pip install --upgrade pip
3435
pip install -e ".[dev]"
3536
3637
- name: Lint with ruff
38+
working-directory: packages/python
3739
run: |
3840
ruff check src/ tests/
3941
4042
- name: Check formatting with black
43+
working-directory: packages/python
4144
run: |
4245
black --check src/ tests/
4346
4447
- name: Type check with mypy
48+
working-directory: packages/python
4549
run: |
4650
mypy src/
4751
4852
- name: Test with pytest
53+
working-directory: packages/python
4954
run: |
5055
pytest tests/ --cov=src/withoutbg --cov-report=xml --run-real-processing
5156
5257
- name: Upload coverage to Codecov
5358
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
5459
uses: codecov/codecov-action@v3
5560
with:
56-
file: ./coverage.xml
61+
file: ./packages/python/coverage.xml
5762
token: ${{ secrets.CODECOV_TOKEN }}
5863
fail_ci_if_error: true
5964

@@ -71,10 +76,11 @@ jobs:
7176
run: pip install bandit[toml]
7277

7378
- name: Run security scan
79+
working-directory: packages/python
7480
run: bandit -r src/ -f json -o bandit-report.json || true
7581

7682
- name: Upload security results
7783
uses: actions/upload-artifact@v4
7884
with:
7985
name: bandit-results
80-
path: bandit-report.json
86+
path: packages/python/bandit-report.json

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ jobs:
2626
pip install build twine
2727
2828
- name: Build package
29+
working-directory: packages/python
2930
run: python -m build
3031

3132
- name: Check package
33+
working-directory: packages/python
3234
run: twine check dist/*
3335

3436
- name: Create GitHub Release
@@ -44,4 +46,5 @@ jobs:
4446
- name: Publish to PyPI
4547
uses: pypa/gh-action-pypi-publish@release/v1
4648
with:
49+
packages-dir: packages/python/dist/
4750
repository-url: https://upload.pypi.org/legacy/

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,32 @@ Need fastest processing? → withoutBG Pro (optimized infrastructure)
3636

3737
## 🚀 Quick Start
3838

39+
### Docker (Web Interface)
40+
41+
**[View Complete Dockerized Web App Documentation →](https://withoutbg.com/documentation/integrations/dockerized-web-app?utm_source=github&utm_medium=withoutbg-readme&utm_campaign=main-readme)**
42+
43+
```bash
44+
# Clone and start the web application
45+
git clone https://github.com/withoutbg/withoutbg.git
46+
cd withoutbg
47+
48+
# Development mode with hot-reload
49+
docker compose -f apps/web/docker-compose.yml up
50+
51+
# Open in browser
52+
open http://localhost:3000
53+
```
54+
55+
Or run production image:
56+
```bash
57+
# Build and run production image
58+
docker build -f apps/web/Dockerfile -t withoutbg:latest .
59+
docker run -p 80:80 withoutbg:latest
60+
61+
# Open in browser
62+
open http://localhost
63+
```
64+
3965
### Python SDK
4066

4167
**[View Complete Python SDK Documentation →](https://withoutbg.com/documentation/integrations/python-sdk?utm_source=github&utm_medium=withoutbg-readme&utm_campaign=main-readme)**
@@ -111,20 +137,6 @@ withoutbg photo.jpg --verbose
111137
![Example 6](/sample-results/open-source-focus/example6.png)
112138
![Example 4](/sample-results/open-source-focus/example4.png)
113139

114-
### Web Application
115-
116-
**[View Dockerized Web App Documentation →](https://withoutbg.com/documentation/integrations/dockerized-web-app?utm_source=github&utm_medium=withoutbg-readme&utm_campaign=main-readme)**
117-
118-
```bash
119-
# Clone and run with Docker
120-
git clone https://github.com/withoutbg/withoutbg.git
121-
cd withoutbg
122-
docker-compose -f apps/web/docker-compose.yml up
123-
124-
# Open browser
125-
open http://localhost:3000
126-
```
127-
128140
## 📦 Repository Structure
129141

130142
This is a **monorepo** containing multiple components:

0 commit comments

Comments
 (0)