Refactor: Reorganize services into standalone structure
This commit is contained in:
45
optimized/standalone/alpine-unbound/README.md
Normal file
45
optimized/standalone/alpine-unbound/README.md
Normal 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.
|
||||
42
optimized/standalone/alpine-unbound/docker-compose.yml
Normal file
42
optimized/standalone/alpine-unbound/docker-compose.yml
Normal 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
|
||||
Reference in New Issue
Block a user