You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/08/10 14:57:27 UTC
[GitHub] [couchdb-docker] ThibaultJanBeyer edited a comment on issue #54:
chttpd_auth_cache changes listener died database_does_not_exist at
mem3_shards
ThibaultJanBeyer edited a comment on issue #54: chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards
URL: https://github.com/apache/couchdb-docker/issues/54#issuecomment-520153526
Is there a way to pre-create these missing databases for example using the `.ini` file? I'm having hard times to create databases from within the docker image :(
+1 for #142
@happilymarrieddad would you mind sharing your script that does that if you have one?
_Edit:_
Here is how I solved it:
## Docker File
```
FROM couchdb:2
COPY ./prod.ini /opt/couchdb/etc/local.d/
COPY ./prod.sh /usr/local/bin/
EXPOSE 5984
CMD /usr/local/bin/prod.sh & /opt/couchdb/bin/couchdb
```
## prod.sh
```
#!/usr/bin/env bash
sleep 10
curl -X PUT http://admin:neomatcha_very_765_nice@localhost:5984/_users
curl -X PUT http://admin:neomatcha_very_765_nice@localhost:5984/_replicator
curl -X PUT http://admin:neomatcha_very_765_nice@localhost:5984/_global_changes
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services