Docker Community Forums

Share and learn in the Docker community.

Problems with data sync with CaaS


(Mastercatz) #1

docker swarm init

#docker service create -e DB_SERVER=xxx -e DB_USER=PrestaShop -e DB_PASSWD=PrestaShop -e DB_NAME=PrestaShop -e DB_PREFIX=ps --name externaldb-prestashop -p 8111:80 prestashop/prestashop

#docker swarm join \ --token xxx \ xxx.bounceme.net:2377

localhost# docker service ls
ID NAME REPLICAS IMAGE COMMAND
6cohahpxs08g externaldb-prestashop 3/3 prestashop/prestashop

11b283e9f6c6 localhost externaldb-prestashop.3.5juglvh0h0wbme6zpqi0jdmvu prestashop/prestashop:latest Up 4 hours 2016-11-12 10:56:09 +1000

5abbd9f93f71 xxx.eu externaldb-prestashop.1.acbyg58dbgp3663o2asa0wqey prestashop/prestashop:latest Up 4 hours 2016-11-12 10:56:07 +1000

0fa52e38c55d xxx.eu externaldb-prestashop.2.511wfzuroxi4cn552678sgks0 prestashop/prestashop:latest

but the data does not seem to sync with the other nodes ?
ie) if I ssh in on the master and alter a file , the file does not change on the node

how can I go about having data redundancy ?
everytime I reboot a pc or stop a container I am back to stock image …
even when I try and backup a container I am back to defaullt image

#docker commit -p 78727078a04b container
#docker save -o ~/container.tar container
#docker load -i /root/container.tar

how can I keep data persistent and backed up on a remote location ?

docker info

Containers: 79
Running: 13
Paused: 0
Stopped: 66
Images: 168
Server Version: 1.12.3
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: weavemesh overlay bridge null host
Swarm: active
NodeID: 0zc03mp2kckhufpnebw1igp2w
Is Manager: true
ClusterID: 2v7vmkzlazn9cf2ea2p01ihyv
Managers: 1
Nodes: 2
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Heartbeat Tick: 1
Election Tick: 3
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Node Address: 192.168.2.32
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.7.3-040703-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 29.48 GiB
Name: aio
ID: XVX3:6EPD:FKCT:WZ4J:PXQH:5KZ5:5WVE:5PBB:RBJD:X3LY:RYHP:NO22
Docker Root Dir: /media/aio/SSD/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8