Create an organization.
Organization can be used to share maps between members and because members uses same db an remote schema only has to be created once. A remote schema is a schema from a remote database server which can be made accessable using foreign data wrapper.
This commit is contained in:
parent
5e698ad813
commit
ac3cd5c3b2
@ -96,9 +96,10 @@ RUN git clone git://github.com/CartoDB/cartodb.git && \
|
||||
ADD ./config/app_config.yml /cartodb/config/app_config.yml
|
||||
ADD ./config/database.yml /cartodb/config/database.yml
|
||||
ADD ./create_dev_user /cartodb/script/create_dev_user
|
||||
ADD ./setup_organization.sh /cartodb/script/setup_organization.sh
|
||||
ENV PATH /usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
RUN service postgresql start && service redis-server start && \
|
||||
bash -l -c "cd /cartodb && bash script/create_dev_user" && \
|
||||
bash -l -c "cd /cartodb && bash script/create_dev_user && bash script/setup_organization.sh" && \
|
||||
service postgresql stop && service redis-server stop
|
||||
|
||||
EXPOSE 3000 8080 8181
|
||||
|
@ -9,6 +9,9 @@ Just run and connect to http://dev.cartodb.localhost:3000/login into you browser
|
||||
The default login is dev/pass. You may want to change it when you'll run
|
||||
it for the outside.
|
||||
|
||||
It also creates an 'example' organization with owner login admin4example/pass.
|
||||
Organization members can be created on http://example.cartodb.localhost:3000/u/admin4example/organization
|
||||
|
||||
How to build the container:
|
||||
--------------
|
||||
|
||||
@ -24,5 +27,5 @@ How to run the container:
|
||||
docker run -t -i -p 3000:3000 -p 8080:8080 -p 8181:8181 fleu42/docker-cartodb
|
||||
```
|
||||
|
||||
You might need to add cartodb.localhost and dev.cartodb.localhost to your hosts file.
|
||||
|
||||
You might need to add cartodb.localhost, dev.cartodb.localhost and example.cartodb.localhost to your hosts file.
|
||||
Any organization member you create should also be added to your hosts file.
|
||||
|
15
setup_organization.sh
Normal file
15
setup_organization.sh
Normal file
@ -0,0 +1,15 @@
|
||||
cd /cartodb
|
||||
source /usr/local/rvm/scripts/rvm
|
||||
|
||||
echo "insert into feature_flags (id,name, restricted) VALUES (1, 'heatmaps', false);" | psql -U postgres carto_db_development
|
||||
echo "insert into feature_flags (id,name, restricted) VALUES (2, 'georef_disabled', false);" | psql -U postgres carto_db_development
|
||||
|
||||
ORGANIZATION_NAME="example"
|
||||
USERNAME="admin4example"
|
||||
EMAIL="admin@example.com"
|
||||
PASSWORD="pass"
|
||||
|
||||
rake cartodb:db:create_user EMAIL="${EMAIL}" PASSWORD="${PASSWORD}" SUBDOMAIN="${USERNAME}"
|
||||
rake cartodb:db:set_unlimited_table_quota["${USERNAME}"]
|
||||
rake cartodb:db:create_new_organization_with_owner ORGANIZATION_NAME="${ORGANIZATION_NAME}" USERNAME="${USERNAME}" ORGANIZATION_SEATS=100 ORGANIZATION_QUOTA=102400
|
||||
rake cartodb:db:set_organization_quota[$ORGANIZATION_NAME,100]
|
Loading…
Reference in New Issue
Block a user