-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the Docker Compose setup for local development
- Loading branch information
1 parent
ddaf48a
commit 8384767
Showing
12 changed files
with
92 additions
and
1,139 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
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,3 @@ | ||
#!/usr/bin/env bash | ||
CWD=$(pwd) | ||
docker compose -f $CWD/docker-compose.yml build |
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
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,2 @@ | ||
#!/usr/bin/env bash | ||
docker compose down |
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 |
---|---|---|
|
@@ -18,4 +18,4 @@ electrs --network regtest \ | |
--utxos-limit=2048 \ | ||
--db-dir="/opt" \ | ||
--cors="*" \ | ||
-vv | ||
-vv |
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker logs -f $1 |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ FROM node:16-alpine | |
MAINTAINER Gowtham Sundar <[email protected]> | ||
|
||
ARG GIT_URI='https://github.com/hirosystems/stacks-blockchain-api.git' | ||
# ARG GIT_BRANCH='v7.3.0' | ||
ARG GIT_BRANCH='v7.10.0-nakamoto.7' | ||
|
||
WORKDIR /app | ||
|
@@ -12,4 +13,6 @@ RUN echo "GIT_TAG=$(git tag --points-at HEAD)" >> .env | |
RUN npm config set unsafe-perm true && npm ci && npm run build && npm run build:docs && npm prune --production | ||
RUN apk del .build-deps | ||
|
||
EXPOSE 3999 | ||
EXPOSE 3700 | ||
CMD ["node", "./lib/index.js"] |
35 changes: 6 additions & 29 deletions
35
devenv/LOCAL/[0]-DOCKER-COMPOSE/stacks-explorer/docker/Dockerfile
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,51 +1,28 @@ | ||
# -------------------------------------------------------- | ||
FROM node:18-alpine AS build | ||
MAINTAINER Gowtham Sundar <[email protected]> | ||
|
||
ARG REDIS_URL | ||
ARG SEGMENT_WRITE_KEY | ||
ARG SENTRY_AUTH_TOKEN | ||
ARG SENTRY_DSN | ||
ARG SENTRY_LOG_LEVEL=warn | ||
ARG NODE_ENV=production | ||
ARG X_API_KEY | ||
ARG RELEASE_TAG_NAME | ||
|
||
# ARG STACKS_EXPLORER_VERSION='v1.170.1' | ||
ARG GIT_URI='https://github.com/hirosystems/explorer.git' | ||
ARG GIT_BRANCH='v1.170.1' | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache git python3 make g++ | ||
RUN git clone ${GIT_URI} -b ${GIT_BRANCH} . | ||
RUN npm config set registry http://registry.npmjs.org | ||
RUN npm install -g pnpm | ||
RUN pnpm i | ||
RUN pnpm build | ||
|
||
# -------------------------------------------------------- | ||
FROM node:18-alpine | ||
|
||
ARG REDIS_URL | ||
ARG SEGMENT_WRITE_KEY | ||
ARG SENTRY_AUTH_TOKEN | ||
ARG SENTRY_DSN | ||
ARG SENTRY_LOG_LEVEL=warn | ||
ARG NODE_ENV=production | ||
|
||
# Set ENVs so they persist after image is built | ||
ENV REDIS_URL=${REDIS_URL} | ||
ENV SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY} | ||
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN} | ||
ENV SENTRY_DSN=${SENTRY_DSN} | ||
ENV SENTRY_LOG_LEVEL=${SENTRY_LOG_LEVEL} | ||
ENV NODE_ENV=${NODE_ENV} | ||
ENV X_API_KEY=${X_API_KEY} | ||
ENV RELEASE_TAG_NAME=${RELEASE_TAG_NAME} | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app/next.config.js /app/next.config.js | ||
COPY --from=build /app/public /app/public | ||
COPY --from=build /app/.next/static /app/.next/static | ||
COPY --from=build /app/.next/standalone /app | ||
|
||
|
||
EXPOSE 3020 | ||
CMD [ "node", "server.js" ] | ||
EXPOSE 3000 | ||
CMD [ "node", "server.js" ] |
Oops, something went wrong.