sverhoeven / docker-cartodb

Dockerized CartoDB
BSD 3-Clause "New" or "Revised" License
148 stars 116 forks source link

Persistent data at Azure #50

Closed antoniovj1 closed 6 years ago

antoniovj1 commented 6 years ago

I'm able to deploy the container to Azure, and everything seems to be running ok. But I'm trying to make data persistent and I'm unable of running the comands of the documentation since Azure limitations. Is there other way to make data persistent? For example inside the container.

Thanks

rkertesz commented 6 years ago

Is this related to issue #51 that I posted, Or are you asking how to use azure file share with a container? (In my case, I am using an aci) .

rkertesz commented 6 years ago

@antoniovj1 Try to look at the updated description I put at the S.O. question. You will run into the same problem as me but I think it may get you farther than you are, based upon your description.

https://stackoverflow.com/questions/51531270/changing-ownership-of-files-on-azure-file-share-mounted-on-aci

sverhoeven commented 6 years ago

In the fix for #51 the chown happens during container startup.

The startup script could be extended that when the postgresql dir is empty it runs

# start postgresql server  + redis
# initdb 
# install the pg extensions?
cd /cartodb
script/create_dev_user
script/setup_organization.sh
script/geocoder.sh

Not sure about the first commands as these are scattered in the Dockerfile.

In Azure when an empty volume is mounted at /var/lib/postgresql is should be filled during the startup once and later container restarts should persist data on the volume.