Files
I-Form_Research_Server_Stack/docker-compose.yaml
2023-12-05 17:44:28 +00:00

38 lines
1.1 KiB
YAML

services:
# The first service is a portainer instance that allows for easy management of the swarm
portainer:
image: portainer/portainer-ce:latest
ports:
- "9000:9000"
volumes:
- portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
# We also want a watchtower instance to automatically update our services
watchtower:
image: containrrr/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
# This defines the NFS volumes for persistence
#! This requires nodes to be IP whitelisted in the NAS
volumes:
portainer_data:
driver: local
driver_opts:
type: nfs
device: ":volume1/portainer_data"
o: "addr=192.168.1.237,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14,nfsvers=4"