1

I would like apply objectbox sync to fly.io. In testing in local, it is fine with the docker command. But in deploying to fly.io, I have no opinion with how to work -model command in fly.io.

docker run --rm -it \
    --volume "$(pwd):/data" \
    --publish 127.0.0.1:9999:9999 \
    --publish 127.0.0.1:9980:9980 \
    --user $UID \
    objectboxio/sync:sync-server-2022-10-21 \
    --model /data/objectbox-model.json \
    --unsecured-no-authentication \
    --admin-bind 0.0.0.0:9980
Albina
  • 1,901
  • 3
  • 7
  • 19
Sithu Aung
  • 11
  • 2
  • Which Docker image using not clear, what is the error you are getting not mentioned here. Is it just fear of failure? – PavanDevarakonda Apr 22 '23 at 14:49
  • @PavanDevarakonda docker image is provided by objectbox for synchroniation testing.My problem is , I can successfully run in local with this command with docker. But in uploading to fly.io , I don't know where to add this --model /data/objectbox-model.json for database schema. – Sithu Aung Apr 23 '23 at 10:01
  • The model file is stored in the current directory, which is mounted as a volume under /data inside the Docker container. Volumes are also available for fly.io, see the last section: https://fly.io/docs/languages-and-frameworks/dockerfile/#taking-it-further (or https://fly.io/docs/reference/volumes/ directly). You should be able to put the model file there. – Uwe - ObjectBox Apr 24 '23 at 05:49
  • @Uwe-ObjectBox , I have added volume to fly.io and [mounts] source="myapp_data" destination="/data" in fly.toml. but it is not working yet. Is there anything I need to do ? I have also copied objectbox-model.json to root directory. – Sithu Aung Apr 25 '23 at 09:17
  • Sorry, no. I have not used fly.io myself. Do they have a support forum, maybe you can ask there on how to set up volumes? – Uwe - ObjectBox Apr 25 '23 at 13:37
  • @Uwe-ObjectBox is there any deployment guide to follow in hosting sync server. I am quite stuck with it. Is there any support form objectbox team for it? – Sithu Aung Apr 25 '23 at 18:56
  • No deployment guide besides https://sync.objectbox.io/objectbox-sync-server at this point. We offer support if you are a Sync customer: https://objectbox.io/sync/ – Uwe - ObjectBox May 02 '23 at 11:51

0 Answers0