Skip to content

feat: add Docker publishing with environment variable conventions#1

Merged
0x3bfc merged 30 commits intodevelopfrom
ahmed/feat/docker-registry-template
Nov 19, 2025
Merged

feat: add Docker publishing with environment variable conventions#1
0x3bfc merged 30 commits intodevelopfrom
ahmed/feat/docker-registry-template

Conversation

@AhmedKorim
Copy link
Member

@AhmedKorim AhmedKorim commented Nov 18, 2025

Closes #2 , and defining the registration docs

- Add GitHub Actions workflow for Docker publishing
- Support GitHub Container Registry and private registries
- Implement environment variable naming convention (NODE_, NATS_, LOG_, etc.)
- Add dynamic port configuration via NODE_PORT
- Simplify documentation and remove noise
- Support multi-platform builds and security scanning
- Add template detection logic to disable publishing from template repo
- Enable publishing only for consuming repositories after customization
- Add explicit checks for template indicators in README.md
- Update documentation to clarify publishing behavior
- Protect template repository from accidental Docker image publishing
# Set environment variables
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
ENV NODE_PORT=8000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't hardcode this port in the dockerfile, the compose should handle this.

Copy link
Member

@0x3bfc 0x3bfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires some fixes!

README.md Outdated
Comment on lines 31 to 53
## Configuration

```bash
# Run tests
PYTHONPATH=src uv run pytest
### Node Configuration

Configure `node.json` with your node metadata. All fields are required:

- **Identity**: `version`, `node_id`, `name`, `description`
- **Runtime**: `api_url`, `ip_address`, `docker_image`, `status`, `deployment_location`
- **Metadata**: `author`, `created_at`, `source_code_location`
- **Components**: Define your node's functional components

See [Node Configuration Guide](docs/node-configuration.md) for complete details.

### Environment Variables

Copy `.env.example` to `.env` and configure:

**Required:**
- `NODE_NAME` - Node identifier
- `NODE_PORT` - Port inside container (default: 8000)
- `NATS_URL` - NATS server URL (default: nats://localhost:4222)
- `STREAM_NAME` - JetStream name (default: droq-stream)
- `LOG_LEVEL` - Logging level (default: INFO)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this already mentioned in the documentation and the .env.example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I beleive .env.example is a starter/boilerplate and has nothing to do with documention

The `docker_image` field should match your Docker publishing configuration:

```json
"docker_image": "ghcr.io/myorg/my-node:latest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again don't use ghcr!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This js an example

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the example with docker image only please default to the known registry. myorg/my-node:latest

AhmedKorim and others added 6 commits November 19, 2025 15:48
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this file but don't reference it in the main readme file till we release the registry service.

AhmedKorim and others added 6 commits November 19, 2025 16:11
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
Co-authored-by: Ahmed <ahmed.abdullah.ali@protonmail.com>
@AhmedKorim AhmedKorim requested a review from 0x3bfc November 19, 2025 14:22
@0x3bfc 0x3bfc merged commit 7df13f7 into develop Nov 19, 2025
2 checks passed
@0x3bfc 0x3bfc deleted the ahmed/feat/docker-registry-template branch November 19, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants