feat: update Docker configuration and CI/CD workflows for local image builds
This commit is contained in:
10
.github/agents/infra.agent.md
vendored
10
.github/agents/infra.agent.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: infra
|
||||
description: "Use when working on Docker configuration, Docker Compose files, Dockerfiles, Nginx config, Supervisor config, Gitea Actions workflows, CI/CD pipelines, environment variables, or overall project architecture in the condado-news-letter project. Trigger phrases: docker, dockerfile, compose, nginx, ci/cd, gitea actions, build fails, infra, architecture, environment variables, container, supervisor, allinone image."
|
||||
description: "Use when working on Docker configuration, Docker Compose files, Dockerfiles, Nginx config, Supervisor config, Gitea Actions workflows, CI/CD pipelines, deploy flows, environment variables, or overall project architecture in the condado-news-letter project. Trigger phrases: docker, dockerfile, compose, nginx, ci/cd, gitea actions, deploy, build fails, infra, architecture, environment variables, container, supervisor, allinone image."
|
||||
tools: [read, edit, search, execute, todo]
|
||||
argument-hint: "Describe the infrastructure change or Docker/CI task to implement."
|
||||
---
|
||||
@@ -22,6 +22,7 @@ You are a senior DevOps / infrastructure engineer and software architect for the
|
||||
| `docker/supervisord.conf` | Supervisor config (manages postgres + java + nginx inside allinone) |
|
||||
| `docker/entrypoint.sh` | Allinone container entrypoint (DB init, env wiring, supervisord start) |
|
||||
| `.gitea/workflows/ci.yml` | CI: backend tests + frontend tests on pull requests to `develop` |
|
||||
| `.gitea/workflows/build.yml` | Build: create local backend/frontend images on approved PRs to `main` |
|
||||
| `.env.example` | Template for all environment variables |
|
||||
|
||||
## System Topology
|
||||
@@ -53,7 +54,7 @@ Docker volume → /var/lib/postgresql/data
|
||||
| Flavour | Command | Notes |
|
||||
|---|---|---|
|
||||
| Dev | `docker compose up --build` | Includes Mailhog on :1025/:8025 |
|
||||
| Prod (compose) | `docker compose -f docker-compose.prod.yml up --build` | External DB/SMTP |
|
||||
| Prod (compose) | `docker compose -f docker-compose.prod.yml up -d` | External DB/SMTP using prebuilt local images |
|
||||
| All-in-one | `docker run -p 80:80 -e APP_PASSWORD=... <image>` | Everything in one container |
|
||||
|
||||
## Key Environment Variables
|
||||
@@ -73,15 +74,16 @@ All injected at runtime — never hardcoded in images.
|
||||
| `IMAP_HOST` / `IMAP_PORT` / `IMAP_INBOX_FOLDER` | Backend | IMAP server |
|
||||
| `OPENAI_API_KEY` / `OPENAI_MODEL` | Backend | OpenAI credentials |
|
||||
| `APP_RECIPIENTS` | Backend | Comma-separated recipient emails |
|
||||
| `VITE_API_BASE_URL` | Frontend (build-time ARG) | Backend API base URL |
|
||||
| `VITE_API_BASE_URL` | Frontend dev server | Backend API base URL for Vite proxy |
|
||||
|
||||
## CI/CD Pipeline
|
||||
|
||||
| Workflow | Trigger | What it does |
|
||||
|---|---|---|
|
||||
| `ci.yml` | Pull request to `develop` | Backend `./gradlew test` + Frontend `npm run test` |
|
||||
| `build.yml` | Approved PR review to `main` | Builds `condado-newsletter-backend` and `condado-newsletter-frontend` on the target Docker host |
|
||||
|
||||
Legacy publish/version workflows were removed from in-repo automation.
|
||||
The runner shares the target Docker host, so this workflow produces local images directly on that host. `docker-compose.prod.yml` must reference images and not local build directives.
|
||||
|
||||
## Implementation Rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user