mirror of
https://github.com/Blockstream/satellite-api.git
synced 2025-02-20 12:54:28 +01:00
update dockerfiles and lightningd + speed up image build
This commit is contained in:
parent
24c908048e
commit
e155e3ddd5
6 changed files with 15 additions and 12 deletions
|
@ -2,7 +2,7 @@ variables:
|
|||
GIT_SUBMODULE_STRATEGY: none
|
||||
CI_DISPOSABLE_ENVIRONMENT: "true"
|
||||
|
||||
image: blockstream/gcloud-docker@sha256:31c1a01d143558f0ba5677d121891a958fa600195679fe325980ec72e5264f2a
|
||||
image: blockstream/gcloud-docker@sha256:78e68a98c5d6aa36eca45099bae38a1544a1688fd16b506fb914a29fdf6e4afa
|
||||
stages:
|
||||
- build
|
||||
- plan
|
||||
|
@ -19,22 +19,25 @@ before_script:
|
|||
# Run tests and build docker images
|
||||
build:
|
||||
stage: build
|
||||
image: blockstream/satapi-builder@sha256:4f96415f1216c5b6bdb266b1db48558328a497f02da38ce2991ab65b25b7590f
|
||||
image: blockstream/satapi-builder@sha256:a3a137b80a08325bdd50a7c59ae0429b933e7a36db0d74f6ae34af067dfdee2d
|
||||
only:
|
||||
- master@satellite/ionosphere
|
||||
before_script:
|
||||
- ""
|
||||
- export CHARGE_ROOT=$CHARGE_ROOT_CI
|
||||
script:
|
||||
- bundle exec ruby tests/tests.rb || echo "Tests failed.." && exit 1
|
||||
- echo $DOCKERHUB_PW | docker login -u $DOCKERHUB_USER --password-stdin
|
||||
- docker build -f Dockerfile -t blockstream/satellite-api:latest -t blockstream/satellite-api:$CI_COMMIT_SHA .
|
||||
- docker pull blockstream/satellite-api:latest
|
||||
- docker pull blockstream/satellite-api-sse:latest
|
||||
- docker build --cache-from blockstream/satellite-api:latest -f Dockerfile -t blockstream/satellite-api:latest -t blockstream/satellite-api:$CI_COMMIT_SHA .
|
||||
- docker push blockstream/satellite-api:latest
|
||||
- docker push blockstream/satellite-api:$CI_COMMIT_SHA
|
||||
- echo "Building Ionosphere SSE image"
|
||||
- docker build -f Dockerfile.sse -t blockstream/satellite-api-sse:latest -t blockstream/satellite-api-sse:$CI_COMMIT_SHA sse/
|
||||
- echo "Building Satellite API SSE image"
|
||||
- docker build --cache-from blockstream/satellite-api-sse:latest -f Dockerfile.sse -t blockstream/satellite-api-sse:latest -t blockstream/satellite-api-sse:$CI_COMMIT_SHA sse/
|
||||
- docker push blockstream/satellite-api-sse:$CI_COMMIT_SHA
|
||||
- docker push blockstream/satellite-api-sse:latest
|
||||
|
||||
# Any newly-pushed, WIP branch will be ran through plan (keep in mind docker images are using the latest tag, which may be an older one since the current commit doesn't match an available image)
|
||||
# Any newly-pushed, WIP branch will be ran through plan (keep in mind docker images are using the latest tag, which may be an older one since the current commit may not match an available image)
|
||||
plan_satapi:
|
||||
stage: plan
|
||||
only:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:latest
|
||||
FROM alpine@sha256:b3dbf31b77fd99d9c08f780ce6f5282aba076d70a513a8be859d8d3a4d0c92b8
|
||||
|
||||
ENV RUBY_PACKAGES ruby ruby-io-console ruby-irb ruby-rake ruby-bundler ruby-bigdecimal ruby-json
|
||||
ENV RUBY_DEPS libstdc++ tzdata bash ca-certificates openssl sqlite sqlite-dev
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker@sha256:f7211e1779c82e3a50d0d6f165e83f3e2be217a234b0181d5e8bee411d8fcc5f AS docker
|
||||
FROM docker@sha256:453c52a7a7200677f9effa3acc8498a2f71af77c2951ac5e1ac1391053573374 AS docker
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM node:8
|
||||
FROM node:8-slim
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
|
|
@ -17,7 +17,7 @@ data "template_file" "blc" {
|
|||
rpcpass = "${var.rpcpass}"
|
||||
rpcport = "${var.net == "testnet" ? "18332" : "8332"}"
|
||||
bitcoin_cmd = "bitcoind ${var.net == "testnet" ? "-testnet" : ""} -printtoconsole"
|
||||
lightning_cmd = "lightningd ${var.net == "testnet" ? "--testnet" : "--mainnet"} --conf=/root/.lightning/lightning.conf"
|
||||
lightning_cmd = "lightningd ${var.net == "testnet" ? "--testnet" : "--mainnet"} --conf=/root/.lightning/lightning.conf --plugin-dir=/usr/local/bin/plugins"
|
||||
charge_cmd = "charged -d /data/charge.db -l /root/.lightning"
|
||||
announce_addr = "${google_compute_address.blc.address}"
|
||||
lightning_port = 9735
|
||||
|
|
|
@ -129,7 +129,7 @@ variable "bitcoin_docker" {
|
|||
|
||||
variable "lightning_docker" {
|
||||
type = "string"
|
||||
default = "blockstream/lightningd@sha256:361aa1705304825b05625fc4f520458740e0630e55e7eb9c99d0eaef1a8b3c02"
|
||||
default = "blockstream/lightningd@sha256:97f5e8e7a6574b05dcfd88debb2e7b1c6b40ff6d6ebfe911cf3134a2b47c5c26"
|
||||
}
|
||||
|
||||
variable "charge_docker" {
|
||||
|
|
Loading…
Add table
Reference in a new issue