🤖 context
This commit is contained in:
63
CLAUDE.md
Normal file
63
CLAUDE.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is a static website project ("Puercito Fiction" / "Hola") deployed using nginx in a Docker container. The site is automatically deployed to a VM via Gitea Actions when changes are pushed to the main branch.
|
||||
|
||||
## Architecture
|
||||
|
||||
- **Static Site**: HTML/CSS files located in `site/` directory
|
||||
- **Web Server**: nginx Alpine container serving static files
|
||||
- **Deployment**: Docker Compose orchestration with automated CI/CD via Gitea Actions
|
||||
- **nginx Configuration**: Custom config in `nginx.conf` with gzip compression, security headers, static asset caching, and SPA fallback routing
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Local Development
|
||||
|
||||
```bash
|
||||
# Build and run the Docker container locally
|
||||
docker-compose up -d --build
|
||||
|
||||
# View logs
|
||||
docker-compose logs -f
|
||||
|
||||
# Stop the container
|
||||
docker-compose down
|
||||
|
||||
# Access the site
|
||||
# http://localhost:8080
|
||||
```
|
||||
|
||||
### Testing Changes
|
||||
|
||||
After making changes to files in `site/`, rebuild and restart:
|
||||
```bash
|
||||
docker-compose down && docker-compose up -d --build
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
Deployment is automatic on push to main branch via `.gitea/workflows/deploy.yml`. The workflow:
|
||||
1. Checks out code on VM
|
||||
2. Pulls latest changes
|
||||
3. Rebuilds and restarts containers via `docker-compose`
|
||||
|
||||
Manual deployment requires SSH access to the VM with credentials stored in Gitea secrets.
|
||||
|
||||
## File Structure
|
||||
|
||||
- `site/` - Static website files (HTML, CSS)
|
||||
- `nginx.conf` - nginx server configuration
|
||||
- `Dockerfile` - Container image definition (nginx:alpine base)
|
||||
- `docker-compose.yml` - Container orchestration config
|
||||
- `.gitea/workflows/deploy.yml` - CI/CD pipeline configuration
|
||||
|
||||
## Important Notes
|
||||
|
||||
- The site runs on port 8080 locally (mapped from container port 80)
|
||||
- nginx config includes SPA fallback routing (`try_files $uri $uri/ /index.html`)
|
||||
- Static assets are cached for 1 year with immutable cache control
|
||||
- Health checks monitor nginx availability every 30 seconds
|
||||
Reference in New Issue
Block a user