generated from cheqd/.github
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev-1074-did-resolver' into dev-…
…1074-did-resolver
- Loading branch information
Showing
3 changed files
with
70 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
############################################################### | ||
### STAGE 1: Build did-resolver binary pre-requisites ### | ||
############################################################### | ||
|
||
FROM golang:1.17.8-buster as builder | ||
|
||
WORKDIR / | ||
|
||
COPY types /types | ||
COPY services /services | ||
COPY go.mod / | ||
COPY go.sum / | ||
COPY main.go /main.go | ||
|
||
# Make did-resolver binary | ||
RUN go build -o did-resolver main.go | ||
|
||
############################################################### | ||
### STAGE 2: Build did-resolver runner ### | ||
############################################################### | ||
|
||
FROM ubuntu:focal AS runner | ||
LABEL org.opencontainers.image.description "Cheqd DID-Resolver runner" | ||
LABEL org.opencontainers.image.source "https://github.com/cheqd/cheqd-did-resolver" | ||
|
||
# Copy compiled did-resolver binary from Stage 1 | ||
COPY --from=builder /did-resolver /bin | ||
|
||
# Copy base config.yml | ||
WORKDIR /root | ||
COPY config.yml /root | ||
|
||
# | ||
EXPOSE 1313 | ||
ENTRYPOINT ["did-resolver"] |
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,4 @@ | ||
networks: | ||
mainnet: rpc.cheqd.net:443 | ||
testnet: 127.0.0.1:9090 | ||
# testnet: api.testnet.cheqd.network:443 | ||
#testnet: 127.0.0.1:9090 | ||
testnet: 159.89.208.88:443 |
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,33 @@ | ||
version: '3.7' | ||
|
||
|
||
services: | ||
did_resolver: | ||
build: | ||
dockerfile: Dockerfile | ||
user: root | ||
configs: | ||
- source: config | ||
target: /root/config.yml | ||
expose: | ||
- ${RESOLVER_PORT:-1313} | ||
- 9090 | ||
ports: | ||
- "${RESOLVER_PORT:-1313}:${RESOLVER_PORT:-1313}" | ||
profiles: | ||
- resolver | ||
|
||
redirect: | ||
image: morbz/docker-web-redirect | ||
restart: always | ||
ports: | ||
- "${REDIRECTED_PORT:-80}:${REDIRECTED_PORT:-80}" | ||
environment: | ||
- VIRTUAL_HOST=localhost:80 | ||
- REDIRECT_TARGET=${CHEQD_RESOLVER_PATH:-http://localhost:1313} | ||
profiles: | ||
- driver | ||
|
||
configs: | ||
config: | ||
file: config.yml |