i am fiddling with the docker images of couchbase server and sync gateway. to get this running i have this simplistic docker-compose file:
version: '2’
services:
config:
image: nginx
ports:
- "8089:80"
volumes:
- ./config:/usr/share/nginx/html:ro
sync-gateway:
depends_on:
- config
- couchbase
image: couchbase/sync-gateway:1.2.1
command: -logFilePath=/var/log/sg.log http://config/config.json
ports:
- “4984:4984”
- "4985:4985"
links:
- config
- couchbase
volumes:
- ./logs/syncgateway:/var/log/
couchbase:
image: couchbase/server
ports:
- “8090:8091”
- “8092:8092”
- “8093:8093”
- “11207:11207”
- “11210:11210”
- “11211:11211”
- “18091:18091”
- "18092:18092"
volumes:
- ./data:/opt/couchbase/var
the sync gateway doesn’t run the first time because the server isn’t available yet. This isn’t such a big deal as there is a workaround but shouldn’t the sync gateway just retry for a couple of times before quitting?
the issue is that the sync gateway only starts correctly on a empty bucket. if i restart the sg after it has run successfully it always fails. i wanted to include or attached the log files but i couldn’t (yet)