-
-
Save Shashankreddysunkara/820b3c36f7eaea568cf74bd14727655f to your computer and use it in GitHub Desktop.
Docker Swarm, an example stack file with NFS volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker stack deploy -c stack-nfs.yml nfs | |
# | |
# This is an example compose file with data volume mounted from remote server via NFS protocol | |
version: "3.7" | |
services: | |
nginx: | |
image: nginx:1.17 | |
ports: | |
- "8080:8080" | |
networks: | |
- nfs | |
volumes: | |
- "nfsdata:/usr/share/nginx/html" | |
networks: | |
nfs: | |
driver: overlay | |
attachable: true | |
volumes: | |
nfsdata: | |
driver: local | |
driver_opts: | |
type: "nfs" | |
o: "addr=10.16.104.4,rw,bg,hard,vers=3,proto=tcp,timeo=600,rsize=65536,wsize=65536,nointr" | |
device: ":/zpool-123456/vol-name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment