Skip to content

Commit

Permalink
Add duckdb dependency to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nullxone committed Oct 24, 2024
1 parent 850dd6a commit 4b70d08
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
FROM node:20-alpine
FROM node:20

RUN apk add jq curl
SHELL ["/bin/bash", "-c"]

COPY /docker /scripts
# Install required system dependencies using apt-get for Debian
RUN apt-get update && apt-get install -y jq curl

# Copy scripts and set up functions directory
COPY /docker /scripts
RUN mkdir -p /functions && /scripts/package-restore.sh

# Expose port
EXPOSE 8080

HEALTHCHECK --interval=5s --timeout=10s --start-period=1s --retries=3 CMD [ "sh", "-c", "exec curl -f http://localhost:${HASURA_CONNECTOR_PORT:-8080}/health" ]
# Health check
HEALTHCHECK --interval=5s --timeout=10s --start-period=1s --retries=3 \
CMD [ "sh", "-c", "exec curl -f http://localhost:${HASURA_CONNECTOR_PORT:-8080}/health" ]

CMD [ "sh", "/scripts/start.sh" ]
# Start command
CMD [ "bash", "/scripts/start.sh" ]
2 changes: 1 addition & 1 deletion docker/package-restore.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eu -o pipefail

cd /functions
Expand Down
4 changes: 2 additions & 2 deletions docker/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -eu -o pipefail

/scripts/package-restore.sh
Expand All @@ -10,4 +10,4 @@ cd /functions
# are propagated properly. "npm start" does not propagate SIGTERM to the
# actual started process
START_CMD=$(jq -r ".scripts.start" "package.json")
PATH=$PATH:/functions/node_modules/.bin exec $START_CMD
NODE_OPTIONS="--max-old-space-size=4096" PATH=$PATH:/functions/node_modules/.bin exec $START_CMD
4 changes: 2 additions & 2 deletions ndc-duckduckapi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions ndc-duckduckapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hasura/ndc-duckduckapi",
"version": "0.1.4",
"version": "0.1.5",
"description": "SDK for the Hasura DDN DuckDuckAPI connector. Easily build a data API from any existing API by ETLing data into DuckDB.",
"author": "Hasura",
"license": "Apache-2.0",
Expand Down Expand Up @@ -32,6 +32,5 @@
"sql-formatter": "^13.0.4",
"sqlstring-sqlite": "^0.1.1"
},
"devDependencies": {
}
"devDependencies": {}
}

0 comments on commit 4b70d08

Please sign in to comment.