Docker stack example: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(nfs nfsvers=3) |
|||
| Zeile 40: | Zeile 40: | ||
restart: always | restart: always | ||
</pre> | </pre> | ||
| + | =docker stack= | ||
| + | *docker stack deploy -c nextcloud.yaml $(basename $PWD) | ||
| + | Ignoring unsupported options: links, restart | ||
| + | |||
| + | Creating network nextcloud_default | ||
| + | Creating service nextcloud_app | ||
| + | Creating service nextcloud_db | ||
| + | =Hier müssten doch Verzeichnisse zu finden sein?= | ||
| + | *ls -l | ||
| + | total 6 | ||
| + | -rw-r--r-- 1 xinux xinux 501 Apr 15 17:47 nextcloud.yaml | ||
Aktuelle Version vom 15. April 2020, 16:54 Uhr
nfs mount
- showmount -e dagobert
Export list for dagobert: /mnt/dagobert/docker (everyone)
- mount -t nfs -o nfsvers=3 dagobert:/mnt/dagobert/docker /mnt/dagobert/docker
create a compose file
- cd /mnt/dagobert/docker
- mkdir nextcloud
- cd nextcloud
- cat nextcloud.yaml
version: '3.5'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=sysadm
- MYSQL_PASSWORD=suxer
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud
ports:
- 8080:80
links:
- db
volumes:
- ./nextcloud:/var/www/html
restart: always
docker stack
- docker stack deploy -c nextcloud.yaml $(basename $PWD)
Ignoring unsupported options: links, restart
Creating network nextcloud_default Creating service nextcloud_app Creating service nextcloud_db
Hier müssten doch Verzeichnisse zu finden sein?
- ls -l
total 6 -rw-r--r-- 1 xinux xinux 501 Apr 15 17:47 nextcloud.yaml