-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from vulcanize/docker
Docker compose and CI
- Loading branch information
Showing
14 changed files
with
174 additions
and
359 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,25 @@ | ||
name: Docker Compose Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Run docker build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: vars | ||
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) | ||
- name: Run docker build | ||
run: make docker-build | ||
- name: Tag docker image | ||
run: docker tag vulcanize/ipld-eth-server docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} | ||
- name: Docker Login | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin | ||
- name: Docker Push | ||
run: docker push docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} | ||
|
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,12 @@ | ||
name: Docker Build | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Run docker build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run docker build | ||
run: make docker-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Publish Docker image | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
push_to_registries: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get the version | ||
id: vars | ||
run: | | ||
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) | ||
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/}) | ||
- name: Docker Login to Github Registry | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin | ||
- name: Docker Pull | ||
run: docker pull docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} | ||
- name: Docker Login to Docker Registry | ||
run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u vulcanizejenkins --password-stdin | ||
- name: Tag docker image | ||
run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}} | ||
- name: Docker Push to Docker Hub | ||
run: docker push vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}} | ||
|
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
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,78 @@ | ||
version: '3.2' | ||
|
||
services: | ||
dapptools: | ||
restart: unless-stopped | ||
image: vulcanize/dapptools:v0.29.0-statediff-0.0.2 | ||
ports: | ||
- "127.0.0.1:8545:8545" | ||
- "127.0.0.1:8546:8546" | ||
|
||
db: | ||
restart: always | ||
image: postgres:10.12-alpine | ||
environment: | ||
POSTGRES_USER: "vdbm" | ||
POSTGRES_DB: "vulcanize_public" | ||
POSTGRES_PASSWORD: "password" | ||
volumes: | ||
- vdb_db_eth_server:/var/lib/postgresql/data | ||
ports: | ||
- "127.0.0.1:8077:5432" | ||
|
||
eth-indexer: | ||
restart: unless-stopped | ||
depends_on: | ||
- db | ||
- dapptools | ||
image: vulcanize/ipld-eth-indexer:v0.3.0-alpha | ||
environment: | ||
DATABASE_NAME: vulcanize_public | ||
DATABASE_HOSTNAME: db | ||
DATABASE_PORT: 5432 | ||
DATABASE_USER: vdbm | ||
DATABASE_PASSWORD: password | ||
ETH_WS_PATH: "dapptools:8546" | ||
ETH_HTTP_PATH: "dapptools:8545" | ||
ETH_CHAIN_ID: 4 | ||
ETH_NETWORK_ID: 4 | ||
VDB_COMMAND: sync | ||
|
||
eth-server: | ||
depends_on: | ||
- db | ||
build: | ||
context: ./ | ||
cache_from: | ||
- alpine:latest | ||
- golang:1.13-alpine | ||
environment: | ||
VDB_COMMAND: "serve" | ||
DATABASE_NAME: "vulcanize_public" | ||
DATABASE_HOSTNAME: "db" | ||
DATABASE_PORT: 5432 | ||
DATABASE_USER: "vdbm" | ||
DATABASE_PASSWORD: "password" | ||
SERVER_WS_PATH: "0.0.0.0:8081" | ||
SERVER_HTTP_PATH: "0.0.0.0:8082" | ||
ports: | ||
- "127.0.0.1:8080:8080" | ||
- "127.0.0.1:8081:8081" | ||
|
||
graphql: | ||
restart: unless-stopped | ||
depends_on: | ||
- db | ||
image: vulcanize/postgraphile:v1.0.1 | ||
environment: | ||
- PG_HOST=db | ||
- PG_PORT=5432 | ||
- PG_DATABASE=vulcanize_public | ||
- PG_USER=vdbm | ||
- PG_PASSWORD=password | ||
- SCHEMA=public,eth | ||
ports: | ||
- "127.0.0.1:5000:5000" | ||
|
||
volumes: | ||
vdb_db_eth_server: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.