Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.so

# Virtual environment
venv/
env/
.venv/

# Python egg metadata
*.egg-info/
*.egg

# Pip environment
pip-log.txt
pip-delete-this-directory.txt

# pyenv
.python-version

# VS Code settings
.vscode/

# MacOS / Windows system files
.DS_Store
Thumbs.db

# Git
.git/
.gitignore

# Docker files
Dockerfile
docker-compose.yml

# Logs
*.log

# Compiled files
*.out
*.o
*.a
*.log

# Build artifacts
build/
dist/
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Use official Python 3.11 base image
FROM python:3.11-slim

# Set work directory
WORKDIR /app

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy project files
COPY . .

# Expose port
EXPOSE 80

# Run the FastAPI app with uvicorn

CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "80"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ It connects to a Grow a Garden WebSocket to receive real-time updates and expose
uvicorn main:app --host 0.0.0.0 --port 80
```

## 🐳 Run with Docker (Optional but Recommended)

You can run this API using Docker to avoid setting up Python and dependencies manually.

### 📦 Using Docker Compose

This method builds and starts everything with one command:

```bash
git clone https://github.com/Liriosha/GAGAPI.git
cd GAGAPI
docker compose up --build
```


## 🤝 Contributing

Expand Down
Empty file added api/__init__.py
Empty file.
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.9"

services:
gagapi:
build: .
container_name: gagapi
ports:
- "80:80"
restart: unless-stopped
File renamed without changes.