From 622db4a7a654e1bdcaaeeb9e0c768ce6a545e416 Mon Sep 17 00:00:00 2001 From: Hexadual Date: Thu, 30 Apr 2026 17:42:26 -0500 Subject: [PATCH] Uses the pre built container --- .gitea/workflows/docker.yml | 9 ++++----- README.md | 27 ++++++++------------------- docker-compose.yml | 12 +++++------- 3 files changed, 17 insertions(+), 31 deletions(-) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index 88a29d7..2423baf 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -32,11 +32,10 @@ jobs: - name: Build & push egg run: | - docker build \ - -t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest \ - -t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} \ - . - docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest + docker compose build egg + docker compose push egg + docker tag ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest \ + ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} - name: Logout diff --git a/README.md b/README.md index 0415391..a304c1b 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,12 @@ The server is maintained separately. This repo contains only the egg client. ## Run an Egg -One Docker command is all it takes: +Clone the repo and use Docker Compose — it pulls the pre-built image from the registry automatically: ```bash -docker run -d --restart unless-stopped \ - -e SERVER_URL=https://your-domain.com \ - -v gcp_egg_data:/data \ - git.hexadual.io/rocobo/gcp-dot-egg:latest +git clone https://git.hexadual.io/rocobo/GCP-Dot.git +cd GCP-Dot +SERVER_URL=https://your-domain.com docker compose up -d ``` The egg will immediately start sending one trial per second and persist its ID across restarts. @@ -40,25 +39,16 @@ The egg will immediately start sending one trial per second and persist its ID a The auto-generated ID is derived from a SHA-256 hash stored at `/data/egg_id` — mount a volume there to keep it stable across restarts. -## Build from Source - -```bash -docker build -t gcp-egg . -docker run -d --restart unless-stopped \ - -e SERVER_URL=https://your-domain.com \ - -v gcp_egg_data:/data \ - gcp-egg -``` - ## Project Structure ``` GCP/ -├── egg.py # Egg client — all logic (~70 lines) -├── requirements.txt # requests==2.31.0 +├── egg.py # Egg client — all logic (~70 lines) +├── requirements.txt # requests==2.31.0 ├── Dockerfile +├── docker-compose.yml └── .gitea/workflows/ - └── docker.yml # CI: builds and pushes egg image on every push to main + └── docker.yml # CI: builds and pushes egg image on every push to main ``` ## Published Images @@ -68,7 +58,6 @@ Every push to `main` builds and publishes to the Gitea container registry via Gi | Image | Pull | |---|---| | Egg | `docker pull git.hexadual.io/rocobo/gcp-dot-egg:latest` | -| Server | `docker pull git.hexadual.io/rocobo/gcp-dot-server:latest` | ## How the Analysis Works diff --git a/docker-compose.yml b/docker-compose.yml index 27123e8..f3d8554 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,11 @@ services: - server: - build: ./server - ports: - - "8000:8000" + egg: + image: git.hexadual.io/rocobo/gcp-dot-egg:latest volumes: - - gcp_data:/data + - gcp_egg_data:/data restart: unless-stopped environment: - - DB_PATH=/data/gcp.db + - SERVER_URL=http://localhost:8000 volumes: - gcp_data: + gcp_egg_data: