Name | dynadock JSON |
Version |
1.1.3
JSON |
| download |
home_page | None |
Summary | Dynamic Docker Compose orchestrator with automatic port allocation and TLS |
upload_time | 2025-09-10 14:36:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. |
keywords |
development
docker
netifaces
pyroute2
python-dotenv
pyyaml
reverse-proxy
rich
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DynaDock
> Inteligentny orchestrator Docker Compose z automatyczną alokacją portów, TLS i lokalnymi subdomenami
[](https://pypi.org/project/dynadock/)
[](https://pypi.org/project/dynadock/)
[](https://github.com/dynapsys/dynadock/actions/workflows/test.yml)
[](LICENSE)
[](https://pypi.org/project/dynadock/)
## Dlaczego DynaDock?
DynaDock rozwiązuje najczęstsze problemy przy pracy z Docker Compose:
- **Konflikty portów** - automatycznie znajduje wolne porty
- **Certyfikaty SSL** - automatyczne HTTPS przez Caddy
- **Lokalne domeny** - każdy serwis dostępny pod własną subdomeną
- **Zero konfiguracji** - działa od razu po instalacji
- **Health checks** - automatyczne monitorowanie serwisów
## Spis treści
- [Dlaczego DynaDock?](#dlaczego-dynadock)
- [Instalacja](#instalacja)
- [Szybki start](#szybki-start)
- [Przykłady użycia](#przykłady-użycia)
- [Funkcjonalności](#funkcjonalności)
- [Komendy CLI](#komendy-cli)
- [Konfiguracja](#konfiguracja)
- [Przykładowe projekty](#przykładowe-projekty)
- [Rozwiązywanie problemów](#rozwiazywanie-problemow)
- [Rozwój](#rozwój)
- [Wkład](#wkład)
- [Autor](#autor)
- [Licencja](#licencja)
- [Podziękowania](#podziękowania)
## Instalacja
### Z PyPI (zalecane)
```bash
pip install dynadock
```
### Z uv (najszybsze)
```bash
uv tool install dynadock
```
### Ze źródeł
```bash
git clone https://github.com/dynapsys/dynadock.git
cd dynadock
make install
```
## Szybki start
### 1. Podstawowe użycie
```bash
# W katalogu z docker-compose.yaml
dynadock up
# Twoje serwisy będą dostępne pod:
# http://api.dynadock.lan:8000
# http://web.dynadock.lan:8001
# http://redis.dynadock.lan:8002
```
### 2. Z HTTPS (zalecane)
```bash
dynadock up --enable-tls
# Serwisy dostępne pod:
# https://api.dynadock.lan
# https://web.dynadock.lan
# https://redis.dynadock.lan
```
### 3. Własna domena
```bash
dynadock up --domain myapp.local --enable-tls
# Serwisy dostępne pod:
# https://api.myapp.local
# https://web.myapp.local
```
## Przykłady użycia
### Aplikacja Node.js z MongoDB
```yaml
# docker-compose.yaml
version: '3.8'
services:
app:
build: .
environment:
- NODE_ENV=development
mongodb:
image: mongo:6
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=secret
```
```bash
dynadock up --enable-tls
# Dostępne pod:
# https://app.dynadock.lan - aplikacja Node.js
# https://mongodb.dynadock.lan - MongoDB (z auth)
```
### Python FastAPI z PostgreSQL
```yaml
# docker-compose.yaml
version: '3.8'
services:
api:
build: .
command: uvicorn main:app --reload
environment:
- DATABASE_URL=postgresql://user:pass@postgres/db
postgres:
image: postgres:15
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=db
```
```bash
dynadock up --enable-tls --domain backend.dev
# Dostępne pod:
# https://api.backend.dev - FastAPI
# https://postgres.backend.dev - PostgreSQL
```
### Mikroserwisy z Redis i RabbitMQ
```yaml
# docker-compose.yaml
version: '3.8'
services:
gateway:
build: ./gateway
depends_on:
- auth-service
- user-service
auth-service:
build: ./services/auth
environment:
- REDIS_URL=redis://redis:6379
user-service:
build: ./services/user
environment:
- RABBITMQ_URL=amqp://rabbitmq:5672
redis:
image: redis:7-alpine
rabbitmq:
image: rabbitmq:3-management
```
```bash
dynadock up --enable-tls --scale user-service=3
# Dostępne pod:
# https://gateway.dynadock.lan - API Gateway
# https://auth-service.dynadock.lan - Auth Service
# https://user-service.dynadock.lan - User Service (load balanced)
# https://redis.dynadock.lan - Redis
# https://rabbitmq.dynadock.lan - RabbitMQ Management
```
## Funkcjonalności
### 🔧 Automatyczna konfiguracja
- **Alokacja portów**: Znajduje wolne porty (8000-9999)
- **Generowanie .env**: Tworzy `.env.dynadock` z wszystkimi zmiennymi
- **Certyfikaty SSL**: Automatyczne HTTPS przez Caddy
- **Health checks**: Monitorowanie stanu serwisów
- **CORS**: Automatyczna konfiguracja dla API
### 🌐 Reverse Proxy (Caddy)
- **Load balancing**: Dla skalowanych serwisów
- **WebSocket support**: Automatyczne przekierowanie WS
- **Kompresja**: Gzip/Brotli dla odpowiedzi
- **Cache**: Inteligentne cache'owanie statycznych zasobów
- **Security headers**: Automatyczne nagłówki bezpieczeństwa
### 🔍 Monitoring
- **Health checks**: Sprawdzanie dostępności serwisów
- **Metryki**: Prometheus-compatible metrics
- **Logi**: Scentralizowane logowanie
- **Alerts**: Powiadomienia o problemach
## Komendy CLI
### Podstawowe komendy
```bash
# Uruchomienie serwisów
dynadock up [OPTIONS]
# Zatrzymanie serwisów
dynadock down
# Status serwisów
dynadock ps
# Logi
dynadock logs [SERVICE]
# Wykonanie komendy w kontenerze
dynadock exec SERVICE COMMAND
# Health check
dynadock health
```
### Opcje `dynadock up`
| Opcja | Opis | Domyślnie |
|-------|------|-----------|
| `--domain` | Domena bazowa | `dynadock.lan` |
| `--enable-tls` | Włącz HTTPS | `false` |
| `--port-range` | Zakres portów | `8000-9999` |
| `--scale SERVICE=N` | Skalowanie serwisu | `1` |
| `--cors-origins` | Dozwolone origins | `*` |
| `--no-caddy` | Wyłącz Caddy proxy | `false` |
| `--env-file` | Dodatkowy plik .env | - |
### Przykłady zaawansowane
```bash
# Produkcja z Let's Encrypt
dynadock up --domain app.com --enable-tls --email admin@app.com
# Development z custom ports
dynadock up --port-range 3000-4000 --enable-tls
# Skalowanie z load balancing
dynadock up --scale api=5 --scale worker=3
# Z custom CORS
dynadock up --cors-origins https://app.com,https://admin.app.com
```
## Konfiguracja
### Plik `.dynadock.yaml`
```yaml
# .dynadock.yaml
domain: myapp.local
enable_tls: true
port_range: 8000-9999
services:
api:
scale: 3
health_check: /health
cors_origins:
- https://app.myapp.local
redis:
expose_port: false
caddy:
email: admin@example.com
staging: false # dla Let's Encrypt
```
### Zmienne środowiskowe
DynaDock automatycznie generuje `.env.dynadock`:
```bash
# .env.dynadock (generowany automatycznie)
DYNADOCK_DOMAIN=myapp.local
DYNADOCK_PROTOCOL=https
DYNADOCK_API_PORT=8000
DYNADOCK_API_URL=https://api.myapp.local
DYNADOCK_WEB_PORT=8001
DYNADOCK_WEB_URL=https://web.myapp.local
DYNADOCK_REDIS_PORT=8002
DYNADOCK_REDIS_URL=redis://redis.myapp.local:8002
```
## Przykładowe projekty
Repozytorium zawiera kompletne przykłady w katalogu `examples/`:
### 1. Simple Web App
```bash
cd examples/simple-web
dynadock up --enable-tls
# Otwórz: https://web.dynadock.lan
```
### 2. REST API z bazą danych
```bash
cd examples/rest-api
dynadock up --enable-tls
# API: https://api.dynadock.lan
# Docs: https://api.dynadock.lan/docs
```
### 3. Mikroserwisy
```bash
cd examples/microservices
dynadock up --enable-tls --scale worker=3
# Gateway: https://gateway.dynadock.lan
# Services: https://[service].dynadock.lan
```
### 4. Full-stack aplikacja
```bash
cd examples/fullstack
dynadock up --enable-tls
# Frontend: https://app.dynadock.lan
# Backend: https://api.dynadock.lan
# Admin: https://admin.dynadock.lan
```
## Rozwiązywanie problemów
### Port już zajęty
```bash
# Sprawdź zajęte porty
dynadock debug ports
# Użyj innego zakresu
dynadock up --port-range 9000-9999
```
### Problemy z DNS
```bash
# Dodaj do /etc/hosts
echo "127.0.0.1 api.dynadock.lan web.dynadock.lan" | sudo tee -a /etc/hosts
# Lub użyj systemd-resolved (under development, check `dynadock --help` for availability)
dynadock setup-dns
```
### Certyfikaty SSL
```bash
# Zaufaj certyfikatom Caddy (under development, check `dynadock --help` for availability)
dynadock trust-certs
# Lub wyłącz TLS w development
dynadock up --no-tls
```
### Problemy z siecią Docker
```bash
# Reset sieci Docker (under development, check `dynadock --help` for availability)
dynadock network reset
# Lub użyj host network
dynadock up --network host
```
## Rozwój
### Wymagania
- Python 3.8+
- Docker 20.10+
- Make (opcjonalne)
- uv (zalecane)
### Setup środowiska
```bash
# Klonuj repo
git clone https://github.com/dynapsys/dynadock.git
cd dynadock
# Instalacja dev dependencies
make dev
# Lub z uv
uv pip install -e ".[dev]"
```
### Uruchamianie testów
```bash
# Wszystkie testy
make test
# Tylko unit tests
make test-unit
# Tylko integration tests
make test-integration
# Z coverage
make coverage
# W trybie watch
make test-watch
```
### Budowanie dokumentacji
```bash
# Buduj dokumentację
make docs
# Serwuj lokalnie
make docs-serve
# Otwórz: http://localhost:8000
```
### Linting i formatowanie
```bash
# Sprawdź kod
make lint
# Formatuj kod
make format
# Pre-commit checks
make pre-commit
```
## Wkład
Zapraszamy do współtworzenia DynaDock! Zobacz nasz [przewodnik dla kontrybutorów](CONTRIBUTING.md), aby dowiedzieć się więcej.
### Jak pomóc?
1. 🍴 Fork repozytorium
2. 🌿 Stwórz branch (`git checkout -b feature/amazing`)
3. ✨ Commituj zmiany (`git commit -m 'Add amazing feature'`)
4. 📤 Push do brancha (`git push origin feature/amazing`)
5. 🎉 Otwórz Pull Request
### Zgłaszanie błędów
Użyj [GitHub Issues](https://github.com/dynapsys/dynadock/issues) do zgłaszania błędów.
## Autor
**DynaDock** jest rozwijany i utrzymywany przez zespół [Dynapsys](https://github.com/dynapsys).
## Licencja
MIT - zobacz [LICENSE](LICENSE)
## Podziękowania
- [Caddy](https://caddyserver.com/) - za świetny reverse proxy
- [Docker](https://docker.com/) - za konteneryzację
- [Click](https://click.palletsprojects.com/) - za CLI framework
- [Rich](https://github.com/willmcgugan/rich) - za piękne terminale
---
*Stworzone z ❤️ przez [Dynapsys](https://github.com/dynapsys)*
Raw data
{
"_id": null,
"home_page": null,
"name": "dynadock",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "development, docker, netifaces, pyroute2, python-dotenv, pyyaml, reverse-proxy, rich",
"author": null,
"author_email": "Tom Sapletta <info@softreck.dev>",
"download_url": "https://files.pythonhosted.org/packages/c6/d8/3a8d0c3a6de55d9e9b645f9ff5e0b3add0af63dec803b7a09e277797e4dd/dynadock-1.1.3.tar.gz",
"platform": null,
"description": "# DynaDock \n\n> Inteligentny orchestrator Docker Compose z automatyczn\u0105 alokacj\u0105 port\u00f3w, TLS i lokalnymi subdomenami\n\n[](https://pypi.org/project/dynadock/)\n[](https://pypi.org/project/dynadock/)\n[](https://github.com/dynapsys/dynadock/actions/workflows/test.yml)\n[](LICENSE)\n[](https://pypi.org/project/dynadock/)\n\n## Dlaczego DynaDock?\n\nDynaDock rozwi\u0105zuje najcz\u0119stsze problemy przy pracy z Docker Compose:\n\n- **Konflikty port\u00f3w** - automatycznie znajduje wolne porty\n- **Certyfikaty SSL** - automatyczne HTTPS przez Caddy\n- **Lokalne domeny** - ka\u017cdy serwis dost\u0119pny pod w\u0142asn\u0105 subdomen\u0105\n- **Zero konfiguracji** - dzia\u0142a od razu po instalacji\n- **Health checks** - automatyczne monitorowanie serwis\u00f3w\n\n## Spis tre\u015bci\n\n- [Dlaczego DynaDock?](#dlaczego-dynadock)\n- [Instalacja](#instalacja)\n- [Szybki start](#szybki-start)\n- [Przyk\u0142ady u\u017cycia](#przyk\u0142ady-u\u017cycia)\n- [Funkcjonalno\u015bci](#funkcjonalno\u015bci)\n- [Komendy CLI](#komendy-cli)\n- [Konfiguracja](#konfiguracja)\n- [Przyk\u0142adowe projekty](#przyk\u0142adowe-projekty)\n- [Rozwi\u0105zywanie problem\u00f3w](#rozwiazywanie-problemow)\n- [Rozw\u00f3j](#rozw\u00f3j)\n- [Wk\u0142ad](#wk\u0142ad)\n- [Autor](#autor)\n- [Licencja](#licencja)\n- [Podzi\u0119kowania](#podzi\u0119kowania)\n\n## Instalacja\n\n### Z PyPI (zalecane)\n\n```bash\npip install dynadock\n```\n\n### Z uv (najszybsze)\n\n```bash\nuv tool install dynadock\n```\n\n### Ze \u017ar\u00f3de\u0142\n\n```bash\ngit clone https://github.com/dynapsys/dynadock.git\ncd dynadock\nmake install\n```\n\n## Szybki start\n\n### 1. Podstawowe u\u017cycie\n\n```bash\n# W katalogu z docker-compose.yaml\ndynadock up\n\n# Twoje serwisy b\u0119d\u0105 dost\u0119pne pod:\n# http://api.dynadock.lan:8000\n# http://web.dynadock.lan:8001\n# http://redis.dynadock.lan:8002\n```\n\n### 2. Z HTTPS (zalecane)\n\n```bash\ndynadock up --enable-tls\n\n# Serwisy dost\u0119pne pod:\n# https://api.dynadock.lan\n# https://web.dynadock.lan\n# https://redis.dynadock.lan\n```\n\n### 3. W\u0142asna domena\n\n```bash\ndynadock up --domain myapp.local --enable-tls\n\n# Serwisy dost\u0119pne pod:\n# https://api.myapp.local\n# https://web.myapp.local\n```\n\n## Przyk\u0142ady u\u017cycia\n\n### Aplikacja Node.js z MongoDB\n\n```yaml\n# docker-compose.yaml\nversion: '3.8'\nservices:\n app:\n build: .\n environment:\n - NODE_ENV=development\n \n mongodb:\n image: mongo:6\n environment:\n - MONGO_INITDB_ROOT_USERNAME=admin\n - MONGO_INITDB_ROOT_PASSWORD=secret\n```\n\n```bash\ndynadock up --enable-tls\n\n# Dost\u0119pne pod:\n# https://app.dynadock.lan - aplikacja Node.js\n# https://mongodb.dynadock.lan - MongoDB (z auth)\n```\n\n### Python FastAPI z PostgreSQL\n\n```yaml\n# docker-compose.yaml\nversion: '3.8'\nservices:\n api:\n build: .\n command: uvicorn main:app --reload\n environment:\n - DATABASE_URL=postgresql://user:pass@postgres/db\n \n postgres:\n image: postgres:15\n environment:\n - POSTGRES_USER=user\n - POSTGRES_PASSWORD=pass\n - POSTGRES_DB=db\n```\n\n```bash\ndynadock up --enable-tls --domain backend.dev\n\n# Dost\u0119pne pod:\n# https://api.backend.dev - FastAPI\n# https://postgres.backend.dev - PostgreSQL\n```\n\n### Mikroserwisy z Redis i RabbitMQ\n\n```yaml\n# docker-compose.yaml\nversion: '3.8'\nservices:\n gateway:\n build: ./gateway\n depends_on:\n - auth-service\n - user-service\n \n auth-service:\n build: ./services/auth\n environment:\n - REDIS_URL=redis://redis:6379\n \n user-service:\n build: ./services/user\n environment:\n - RABBITMQ_URL=amqp://rabbitmq:5672\n \n redis:\n image: redis:7-alpine\n \n rabbitmq:\n image: rabbitmq:3-management\n```\n\n```bash\ndynadock up --enable-tls --scale user-service=3\n\n# Dost\u0119pne pod:\n# https://gateway.dynadock.lan - API Gateway\n# https://auth-service.dynadock.lan - Auth Service\n# https://user-service.dynadock.lan - User Service (load balanced)\n# https://redis.dynadock.lan - Redis\n# https://rabbitmq.dynadock.lan - RabbitMQ Management\n```\n\n## Funkcjonalno\u015bci\n\n### \ud83d\udd27 Automatyczna konfiguracja\n\n- **Alokacja port\u00f3w**: Znajduje wolne porty (8000-9999)\n- **Generowanie .env**: Tworzy `.env.dynadock` z wszystkimi zmiennymi\n- **Certyfikaty SSL**: Automatyczne HTTPS przez Caddy\n- **Health checks**: Monitorowanie stanu serwis\u00f3w\n- **CORS**: Automatyczna konfiguracja dla API\n\n### \ud83c\udf10 Reverse Proxy (Caddy)\n\n- **Load balancing**: Dla skalowanych serwis\u00f3w\n- **WebSocket support**: Automatyczne przekierowanie WS\n- **Kompresja**: Gzip/Brotli dla odpowiedzi\n- **Cache**: Inteligentne cache'owanie statycznych zasob\u00f3w\n- **Security headers**: Automatyczne nag\u0142\u00f3wki bezpiecze\u0144stwa\n\n### \ud83d\udd0d Monitoring\n\n- **Health checks**: Sprawdzanie dost\u0119pno\u015bci serwis\u00f3w\n- **Metryki**: Prometheus-compatible metrics\n- **Logi**: Scentralizowane logowanie\n- **Alerts**: Powiadomienia o problemach\n\n## Komendy CLI\n\n### Podstawowe komendy\n\n```bash\n# Uruchomienie serwis\u00f3w\ndynadock up [OPTIONS]\n\n# Zatrzymanie serwis\u00f3w\ndynadock down\n\n# Status serwis\u00f3w\ndynadock ps\n\n# Logi\ndynadock logs [SERVICE]\n\n# Wykonanie komendy w kontenerze\ndynadock exec SERVICE COMMAND\n\n# Health check\ndynadock health\n```\n\n### Opcje `dynadock up`\n\n| Opcja | Opis | Domy\u015blnie |\n|-------|------|-----------|\n| `--domain` | Domena bazowa | `dynadock.lan` |\n| `--enable-tls` | W\u0142\u0105cz HTTPS | `false` |\n| `--port-range` | Zakres port\u00f3w | `8000-9999` |\n| `--scale SERVICE=N` | Skalowanie serwisu | `1` |\n| `--cors-origins` | Dozwolone origins | `*` |\n| `--no-caddy` | Wy\u0142\u0105cz Caddy proxy | `false` |\n| `--env-file` | Dodatkowy plik .env | - |\n\n### Przyk\u0142ady zaawansowane\n\n```bash\n# Produkcja z Let's Encrypt\ndynadock up --domain app.com --enable-tls --email admin@app.com\n\n# Development z custom ports\ndynadock up --port-range 3000-4000 --enable-tls\n\n# Skalowanie z load balancing\ndynadock up --scale api=5 --scale worker=3\n\n# Z custom CORS\ndynadock up --cors-origins https://app.com,https://admin.app.com\n```\n\n## Konfiguracja\n\n### Plik `.dynadock.yaml`\n\n```yaml\n# .dynadock.yaml\ndomain: myapp.local\nenable_tls: true\nport_range: 8000-9999\nservices:\n api:\n scale: 3\n health_check: /health\n cors_origins:\n - https://app.myapp.local\n redis:\n expose_port: false\ncaddy:\n email: admin@example.com\n staging: false # dla Let's Encrypt\n```\n\n### Zmienne \u015brodowiskowe\n\nDynaDock automatycznie generuje `.env.dynadock`:\n\n```bash\n# .env.dynadock (generowany automatycznie)\nDYNADOCK_DOMAIN=myapp.local\nDYNADOCK_PROTOCOL=https\nDYNADOCK_API_PORT=8000\nDYNADOCK_API_URL=https://api.myapp.local\nDYNADOCK_WEB_PORT=8001\nDYNADOCK_WEB_URL=https://web.myapp.local\nDYNADOCK_REDIS_PORT=8002\nDYNADOCK_REDIS_URL=redis://redis.myapp.local:8002\n```\n\n## Przyk\u0142adowe projekty\n\nRepozytorium zawiera kompletne przyk\u0142ady w katalogu `examples/`:\n\n### 1. Simple Web App\n\n```bash\ncd examples/simple-web\ndynadock up --enable-tls\n# Otw\u00f3rz: https://web.dynadock.lan\n```\n\n### 2. REST API z baz\u0105 danych\n\n```bash\ncd examples/rest-api\ndynadock up --enable-tls\n# API: https://api.dynadock.lan\n# Docs: https://api.dynadock.lan/docs\n```\n\n### 3. Mikroserwisy\n\n```bash\ncd examples/microservices\ndynadock up --enable-tls --scale worker=3\n# Gateway: https://gateway.dynadock.lan\n# Services: https://[service].dynadock.lan\n```\n\n### 4. Full-stack aplikacja\n\n```bash\ncd examples/fullstack\ndynadock up --enable-tls\n# Frontend: https://app.dynadock.lan\n# Backend: https://api.dynadock.lan\n# Admin: https://admin.dynadock.lan\n```\n\n## Rozwi\u0105zywanie problem\u00f3w\n\n### Port ju\u017c zaj\u0119ty\n\n```bash\n# Sprawd\u017a zaj\u0119te porty\ndynadock debug ports\n\n# U\u017cyj innego zakresu\ndynadock up --port-range 9000-9999\n```\n\n### Problemy z DNS\n\n```bash\n# Dodaj do /etc/hosts\necho \"127.0.0.1 api.dynadock.lan web.dynadock.lan\" | sudo tee -a /etc/hosts\n\n# Lub u\u017cyj systemd-resolved (under development, check `dynadock --help` for availability)\ndynadock setup-dns\n```\n\n### Certyfikaty SSL\n\n```bash\n# Zaufaj certyfikatom Caddy (under development, check `dynadock --help` for availability)\ndynadock trust-certs\n\n# Lub wy\u0142\u0105cz TLS w development\ndynadock up --no-tls\n```\n\n### Problemy z sieci\u0105 Docker\n\n```bash\n# Reset sieci Docker (under development, check `dynadock --help` for availability)\ndynadock network reset\n\n# Lub u\u017cyj host network\ndynadock up --network host\n```\n\n## Rozw\u00f3j\n\n### Wymagania\n\n- Python 3.8+\n- Docker 20.10+\n- Make (opcjonalne)\n- uv (zalecane)\n\n### Setup \u015brodowiska\n\n```bash\n# Klonuj repo\ngit clone https://github.com/dynapsys/dynadock.git\ncd dynadock\n\n# Instalacja dev dependencies\nmake dev\n\n# Lub z uv\nuv pip install -e \".[dev]\"\n```\n\n### Uruchamianie test\u00f3w\n\n```bash\n# Wszystkie testy\nmake test\n\n# Tylko unit tests\nmake test-unit\n\n# Tylko integration tests\nmake test-integration\n\n# Z coverage\nmake coverage\n\n# W trybie watch\nmake test-watch\n```\n\n### Budowanie dokumentacji\n\n```bash\n# Buduj dokumentacj\u0119\nmake docs\n\n# Serwuj lokalnie\nmake docs-serve\n# Otw\u00f3rz: http://localhost:8000\n```\n\n### Linting i formatowanie\n\n```bash\n# Sprawd\u017a kod\nmake lint\n\n# Formatuj kod\nmake format\n\n# Pre-commit checks\nmake pre-commit\n```\n\n## Wk\u0142ad\n\nZapraszamy do wsp\u00f3\u0142tworzenia DynaDock! Zobacz nasz [przewodnik dla kontrybutor\u00f3w](CONTRIBUTING.md), aby dowiedzie\u0107 si\u0119 wi\u0119cej.\n\n### Jak pom\u00f3c?\n\n1. \ud83c\udf74 Fork repozytorium\n2. \ud83c\udf3f Stw\u00f3rz branch (`git checkout -b feature/amazing`)\n3. \u2728 Commituj zmiany (`git commit -m 'Add amazing feature'`)\n4. \ud83d\udce4 Push do brancha (`git push origin feature/amazing`)\n5. \ud83c\udf89 Otw\u00f3rz Pull Request\n\n### Zg\u0142aszanie b\u0142\u0119d\u00f3w\n\nU\u017cyj [GitHub Issues](https://github.com/dynapsys/dynadock/issues) do zg\u0142aszania b\u0142\u0119d\u00f3w.\n\n## Autor\n\n**DynaDock** jest rozwijany i utrzymywany przez zesp\u00f3\u0142 [Dynapsys](https://github.com/dynapsys).\n\n## Licencja\n\nMIT - zobacz [LICENSE](LICENSE)\n\n## Podzi\u0119kowania\n\n- [Caddy](https://caddyserver.com/) - za \u015bwietny reverse proxy\n- [Docker](https://docker.com/) - za konteneryzacj\u0119\n- [Click](https://click.palletsprojects.com/) - za CLI framework\n- [Rich](https://github.com/willmcgugan/rich) - za pi\u0119kne terminale\n\n---\n\n*Stworzone z \u2764\ufe0f przez [Dynapsys](https://github.com/dynapsys)*\n",
"bugtrack_url": null,
"license": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n \n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n \n 1. Definitions.\n \n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n \n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n \n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n \n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n \n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n \n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n \n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n \n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n \n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n \n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n \n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n \n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n \n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n \n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n \n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n \n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n \n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n \n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n \n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n \n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n \n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n \n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n \n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n \n END OF TERMS AND CONDITIONS\n \n APPENDIX: How to apply the Apache License to your work.\n \n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n \n Copyright [yyyy] [name of copyright owner]\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.",
"summary": "Dynamic Docker Compose orchestrator with automatic port allocation and TLS",
"version": "1.1.3",
"project_urls": {
"Changelog": "https://github.com/dynapsys/dynadock/releases",
"Homepage": "https://github.com/dynapsys/dynadock",
"Issues": "https://github.com/dynapsys/dynadock/issues",
"Repository": "https://github.com/dynapsys/dynadock"
},
"split_keywords": [
"development",
" docker",
" netifaces",
" pyroute2",
" python-dotenv",
" pyyaml",
" reverse-proxy",
" rich"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "90b332c989d7c8e71010bb939df33df54618eff2026fdadacc1732e1697fff18",
"md5": "7f40498935e6f4e7e10b77a2db11c3e7",
"sha256": "ed5549491bfc784e5c51e1b1c5d67d067952039dc4bc10896963da17b54426d2"
},
"downloads": -1,
"filename": "dynadock-1.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f40498935e6f4e7e10b77a2db11c3e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14333,
"upload_time": "2025-09-10T14:36:10",
"upload_time_iso_8601": "2025-09-10T14:36:10.219176Z",
"url": "https://files.pythonhosted.org/packages/90/b3/32c989d7c8e71010bb939df33df54618eff2026fdadacc1732e1697fff18/dynadock-1.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c6d83a8d0c3a6de55d9e9b645f9ff5e0b3add0af63dec803b7a09e277797e4dd",
"md5": "c9d516cd7d1e0aebb2036f900dbdaefa",
"sha256": "8914f17b9b00baa2a57bba6b16b517074519f896c40fc8883039264605abbd74"
},
"downloads": -1,
"filename": "dynadock-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "c9d516cd7d1e0aebb2036f900dbdaefa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 12914,
"upload_time": "2025-09-10T14:36:12",
"upload_time_iso_8601": "2025-09-10T14:36:12.618962Z",
"url": "https://files.pythonhosted.org/packages/c6/d8/3a8d0c3a6de55d9e9b645f9ff5e0b3add0af63dec803b7a09e277797e4dd/dynadock-1.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-10 14:36:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dynapsys",
"github_project": "dynadock",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dynadock"
}