docker:compose
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| docker:compose [2020/03/16 21:40] – franz | docker:compose [2025/11/07 10:52] (aktuell) – [Secrets und docker-compose - ein Beispiel] franz | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Docker Compose ====== | ====== Docker Compose ====== | ||
| - | ===== Commandos | + | ---- |
| + | |||
| + | ===== Commands | ||
| * '' | * '' | ||
| - | * '' | + | * '' |
| - | * | + | |
| - | -d : startet die Container im Hintergrund | + | |
| * '' | * '' | ||
| * '' | * '' | ||
| * docker-compose stop [SERVICENAME] stoppt alle zu dem Stack gehörenden Container. | * docker-compose stop [SERVICENAME] stoppt alle zu dem Stack gehörenden Container. | ||
| - | * '' | + | * '' |
| - | * | + | * '' |
| - | + | ||
| - | -f : erzwingt das Löschen der Container | + | |
| - | + | ||
| - | * '' | + | |
| - | * | + | |
| - | + | ||
| - | -d im Hintergrund gestartet wurde können so die Logsfiles verfolgt werden. | + | |
| * '' | * '' | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | ===== Einführung in Docker Compose ===== | ||
| + | |||
| + | eine gute Einführung in die Syntax und Bedeutung der Befehle [[https:// | ||
| + | |||
| ===== Installation von Docker Compose ===== | ===== Installation von Docker Compose ===== | ||
| Zeile 28: | Zeile 24: | ||
| Docker Compose [[https:// | Docker Compose [[https:// | ||
| + | |||
| + | ===== Secrets und docker-compose - ein Beispiel ===== | ||
| + | |||
| + | hier an einem Beispiel von Nextdcloud | ||
| + | |||
| + | < | ||
| + | version: ' | ||
| + | |||
| + | services: | ||
| + | mariadb: | ||
| + | image: mariadb: | ||
| + | restart: always | ||
| + | environment: | ||
| + | MYSQL_ROOT_PASSWORD_FILE: | ||
| + | MYSQL_DATABASE: | ||
| + | MYSQL_USER: nextcloud | ||
| + | MYSQL_PASSWORD_FILE: | ||
| + | secrets: | ||
| + | - db_root_password | ||
| + | - db_user_password | ||
| + | volumes: | ||
| + | - db:/ | ||
| + | |||
| + | redis: | ||
| + | image: redis: | ||
| + | restart: always | ||
| + | command: [" | ||
| + | secrets: | ||
| + | - redis_password | ||
| + | volumes: | ||
| + | - redis:/data | ||
| + | |||
| + | nextcloud: | ||
| + | image: nextcloud: | ||
| + | restart: always | ||
| + | depends_on: | ||
| + | - mariadb | ||
| + | - redis | ||
| + | environment: | ||
| + | MYSQL_PASSWORD_FILE: | ||
| + | MYSQL_DATABASE: | ||
| + | MYSQL_USER: nextcloud | ||
| + | MYSQL_HOST: mariadb | ||
| + | REDIS_HOST: redis | ||
| + | REDIS_HOST_PASSWORD_FILE: | ||
| + | NEXTCLOUD_ADMIN_PASSWORD_FILE: | ||
| + | NEXTCLOUD_ADMIN_USER: | ||
| + | secrets: | ||
| + | - db_user_password | ||
| + | - redis_password | ||
| + | - nextcloud_admin_password | ||
| + | volumes: | ||
| + | - nextcloud:/ | ||
| + | ports: | ||
| + | - 8080:80 | ||
| + | |||
| + | volumes: | ||
| + | db: | ||
| + | redis: | ||
| + | nextcloud: | ||
| + | |||
| + | secrets: | ||
| + | db_root_password: | ||
| + | file: ./ | ||
| + | db_user_password: | ||
| + | file: ./ | ||
| + | redis_password: | ||
| + | file: ./ | ||
| + | nextcloud_admin_password: | ||
| + | file: ./ | ||
| + | |||
| + | </ | ||
docker/compose.1584391216.txt.gz · Zuletzt geändert: (Externe Bearbeitung)