Refactor: Reorganize services into standalone structure

This commit is contained in:
2026-01-25 15:19:53 -06:00
parent cf360234c1
commit 10521ee94d
52 changed files with 3253 additions and 11 deletions

View File

@@ -0,0 +1,45 @@
# Alpine Unbound
This directory contains the `docker-compose.yml` for building and running an Alpine-based Unbound DNS resolver.
## Running with Podman Compose
To run this service using `podman-compose`:
1. Navigate to this directory:
```bash
cd optimized/standalone/alpine-unbound
```
2. Build the image (if not already built by the original `build.sh`):
```bash
podman-compose build
```
3. Start the service:
```bash
podman-compose up -d
```
## Running with Podman (if built elsewhere)
If you have already built the `alpine-unbound:latest` image, you can run it directly with Podman. Note that translating a full `docker-compose.yml` to a single `podman run` command can be complex due to network and volume declarations.
A simplified `podman run` example (adjust networks and volumes as needed for your specific setup):
```bash
podman run -d \
--name alpine_unbound \
--network dns_net \
-p 5335:5335/tcp \
-p 5335:5335/udp \
-v unbound_config:/etc/unbound/unbound.conf.d \
-v unbound_data:/var/lib/unbound \
alpine-unbound:latest
```
Ensure the `dns_net` network and necessary volumes exist before running.
## Notes
* Remember to replace any placeholder values (e.g., timezone, ports) with your actual configuration.
* The original `build.sh` file might contain additional steps or configurations relevant to the build process.
* For persistent configuration, ensure the `unbound_config` volume is correctly managed.

View File

@@ -0,0 +1,42 @@
version: "3.9"
services:
alpine-unbound:
build:
context: .
dockerfile: Dockerfile
image: alpine-unbound:latest
container_name: alpine_unbound
restart: unless-stopped
environment:
- TZ=America/New_York
volumes:
- unbound_config:/etc/unbound/unbound.conf.d
- unbound_data:/var/lib/unbound
ports:
- "5335:5335/tcp"
- "5335:5335/udp"
networks:
- dns_net
healthcheck:
test: [ "CMD", "/usr/local/bin/healthcheck.sh" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 32M
networks:
dns_net:
driver: bridge
volumes:
unbound_config:
driver: local
unbound_data:
driver: local