Skip to content

Commit 7474dc7

Browse files
authored
move config file creation into dockerfile (#7)
1 parent 11e2c9f commit 7474dc7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
FROM docker:stable
22
RUN apk add --no-cache curl
3+
4+
RUN mkdir -p /opt/couchdb/etc/local.d && echo "[couchdb]\ndatabase_dir = /ram_disk\nview_index_dir = /ram_disk\ndelayed_commits = true\n[httpd]\nsocket_options = [{nodelay, true}]\n[native_query_servers]\nerlang = {couch_native_process, start_link, []}" >> /opt/couchdb/etc/local.d/01-github-action-custom.ini
5+
36
COPY entrypoint.sh /entrypoint.sh
47
ENTRYPOINT ["/entrypoint.sh"]

entrypoint.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ sh -c "docker run -d -p 5984:5984 -p 5986:5986 --tmpfs /ram_disk couchdb:$INPUT_
66
# CouchDB container name
77
export NAME=`docker ps --format "{{.Names}}" --last 1`
88

9-
docker exec $NAME sh -c 'mkdir -p /opt/couchdb/etc/local.d && echo "[couchdb]\ndatabase_dir = /ram_disk\nview_index_dir = /ram_disk\ndelayed_commits = true\n[httpd]\nsocket_options = [{nodelay, true}]\n[native_query_servers]\nerlang = {couch_native_process, start_link, []}" >> /opt/couchdb/etc/local.d/01-github-action-custom.ini'
10-
119
wait_for_couchdb() {
1210
echo "Waiting for CouchDB..."
1311
hostip=$(ip route show | awk '/default/ {print $3}')

0 commit comments

Comments
 (0)