-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c0b478
commit be0425f
Showing
3 changed files
with
58 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
FROM couchdb:latest | ||
|
||
ENV COUCHDB_USER=admin | ||
ENV COUCHDB_PASSWORD=admin | ||
|
||
EXPOSE 5984 | ||
COPY uat.sh uat.sh | ||
RUN sh uat.sh | ||
|
||
COPY startup.sh /usr/local/bin/startup.sh | ||
|
||
RUN chmod +x /usr/local/bin/startup.sh | ||
|
||
ENTRYPOINT [ "/usr/local/bin/startup.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
|
||
# create some basic configurations | ||
cat >/opt/couchdb/etc/local.ini <<EOF | ||
[couchdb] | ||
single_node=true | ||
[admins] | ||
admin = admin | ||
EOF | ||
|
||
#nohup bash -c "/docker-entrypoint.sh /opt/couchdb/bin/couchdb &" | ||
#sleep 5 | ||
|
||
# Start CouchDB in the background | ||
/opt/couchdb/bin/couchdb & | ||
|
||
# Wait for CouchDB to start | ||
until curl -s http://127.0.0.1:5984/_up; do | ||
echo "Waiting for CouchDB to start..." | ||
sleep 1 | ||
done | ||
|
||
# Curl the _users table | ||
echo "Curling the _users table..." | ||
curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD http://127.0.0.1:5984/_users | ||
|
||
# Curl the _replicator table | ||
echo "Curling the _replicator table..." | ||
curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD http://127.0.0.1:5984/_replicator | ||
|
||
# Bring CouchDB to the foreground | ||
wait | ||
|
||
|
||
|
||
#!/bin/sh -xe | ||
|
||
|
||
|
||
#curl -X PUT http://admin:[email protected]:5984/_users | ||
#curl -X PUT http://admin:[email protected]:5984/_replicator | ||
#curl -X PUT http://admin:[email protected]:5984/idss | ||
|
||
# Bring CouchDB to the foreground | ||
#wait | ||
|
||
# this is handled by the loader python script instead |
This file was deleted.
Oops, something went wrong.