sverhoeven / docker-cartodb

Dockerized CartoDB
BSD 3-Clause "New" or "Revised" License
147 stars 117 forks source link

Persist data = permission denied #58

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello,

When I run these commands as part of the persist data workaround, I get a permission denied message:

_docker cp cartodb_pgdata:/var/lib/postgresql $PWD/cartodbpgdata

Then I get this: _jake@ubu:~$ docker cp cartodb_pgdata:/var/lib/postgresql $PWD/cartodb_pgdata mkdir /home/jake/cartodbpgdata/postgresql: permission denied

I can see that it won't let me copy from the cartodb_pgdata folder. When I look at the folder in the files GUI I get this message: _You do not have the permissions necessary to view the contents of “cartodbpgdata”.

Not sure what the way around this is. I built a lovely house price affordability over time/space map that I've saved as a .carto but would very much like it to always be there when I open it and eventually share it.

Thanks again for your amazing work on this, it's all very exciting!

ghost commented 6 years ago

FIXED

It was all to do with the order of following instructions (unless anyone knows differently).

  1. Build Container as per instructions (ideally from a fresh Ubuntu)

  2. Run this code:

sudo docker create --name cartodb_pgdata sverhoeven/cartodb sudo docker cp cartodb_pgdata:/var/lib/postgresql $PWD/cartodb_pgdata sudo docker rm -f cartodb_pgdata

  1. Then this:

sudo docker run -d -p 80:80 -h cartodb.example.com -v $PWD/cartodb_pgdata:/var/lib/postgresql sverhoeven/cartodb # replace the url with cartodb.localhost or your own

  1. Then this:

sudo sh -c 'echo 127.0.1.1 cartodb.localhost >> /etc/hosts'

After a few minutes it will load from this link:

[http://cartodb.localhost/user/admin4example/organization]

The default login is dev/pass1234