Uses the pre built container
All checks were successful
Build & publish Docker images / Build & push all images (push) Successful in 2s

This commit is contained in:
Hexadual
2026-04-30 17:42:26 -05:00
parent 02b71862a0
commit 622db4a7a6
3 changed files with 17 additions and 31 deletions

View File

@@ -32,11 +32,10 @@ jobs:
- name: Build & push egg - name: Build & push egg
run: | run: |
docker build \ docker compose build egg
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:latest \ docker compose push egg
-t ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} \ 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:latest
docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }} docker push ${{ env.REGISTRY }}/rocobo/gcp-dot-egg:${{ github.sha }}
- name: Logout - name: Logout

View File

@@ -20,13 +20,12 @@ The server is maintained separately. This repo contains only the egg client.
## Run an Egg ## 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 ```bash
docker run -d --restart unless-stopped \ git clone https://git.hexadual.io/rocobo/GCP-Dot.git
-e SERVER_URL=https://your-domain.com \ cd GCP-Dot
-v gcp_egg_data:/data \ SERVER_URL=https://your-domain.com docker compose up -d
git.hexadual.io/rocobo/gcp-dot-egg:latest
``` ```
The egg will immediately start sending one trial per second and persist its ID across restarts. 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. 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 ## Project Structure
``` ```
GCP/ GCP/
├── egg.py # Egg client — all logic (~70 lines) ├── egg.py # Egg client — all logic (~70 lines)
├── requirements.txt # requests==2.31.0 ├── requirements.txt # requests==2.31.0
├── Dockerfile ├── Dockerfile
├── docker-compose.yml
└── .gitea/workflows/ └── .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 ## Published Images
@@ -68,7 +58,6 @@ Every push to `main` builds and publishes to the Gitea container registry via Gi
| Image | Pull | | Image | Pull |
|---|---| |---|---|
| Egg | `docker pull git.hexadual.io/rocobo/gcp-dot-egg:latest` | | 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 ## How the Analysis Works

View File

@@ -1,13 +1,11 @@
services: services:
server: egg:
build: ./server image: git.hexadual.io/rocobo/gcp-dot-egg:latest
ports:
- "8000:8000"
volumes: volumes:
- gcp_data:/data - gcp_egg_data:/data
restart: unless-stopped restart: unless-stopped
environment: environment:
- DB_PATH=/data/gcp.db - SERVER_URL=http://localhost:8000
volumes: volumes:
gcp_data: gcp_egg_data: