Skip to content

Commit 66e9554

Browse files
committed
tidy up dockers
1 parent 0ddfbf8 commit 66e9554

File tree

7 files changed

+39
-146
lines changed

7 files changed

+39
-146
lines changed

.github/images/hcp/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM debian:12-slim
2+
3+
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
4+
5+
ARG TARGETARCH
6+
COPY bin/operator-Linux-${TARGETARCH} /hcp/operator
7+
COPY bin/rpc-Linux-${TARGETARCH} /hcp/rpc
8+
COPY bin/metrics-exporter-Linux-${TARGETARCH} /hcp/metrics-exporter
9+
COPY bin/open-head-Linux-${TARGETARCH} /hcp/open-head
10+
11+
RUN chmod +x /hcp/*
12+
13+
ENV PATH="/hcp:${PATH}"
14+
15+
# Configure rocket to listen on all interfaces.
16+
ENV ROCKET_ADDRESS=0.0.0.0
17+
ENV ROCKET_PORT=8000
18+
19+
# Expose the port that the application listens on.
20+
EXPOSE 8000

.github/images/operator/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/images/rpc/Dockerfile

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/images/rpc/dockerfile.hydra

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on:
44
push:
55
branches:
66
- "main"
7+
- "refactor/monorepo"
78
paths:
8-
- ".github/image/Dockerfile"
9+
- ".github/images/hcp/Dockerfile"
910
- ".github/workflows/docker.yml"
10-
- "src/**"
11+
- "crates/**"
1112

1213
jobs:
1314
build:
@@ -21,11 +22,6 @@ jobs:
2122
target: x86_64-unknown-linux-gnu
2223
args: "--locked --release"
2324

24-
- release_for: Linux-arm64
25-
build_on: buildjet-2vcpu-ubuntu-2204-arm
26-
target: "aarch64-unknown-linux-gnu"
27-
args: "--locked --release"
28-
2925
runs-on: ${{ matrix.build_on }}
3026
steps:
3127
- name: checkout repository
@@ -48,13 +44,19 @@ jobs:
4844

4945
- name: rename binaries
5046
run: |
51-
mv target/${{ matrix.target }}/release/operator${{ matrix.ext }} operator-${{ matrix.release_for }}${{ matrix.ext }}
47+
mv target/${{ matrix.target }}/release/operator operator-${{ matrix.release_for }}
48+
mv target/${{ matrix.target }}/release/rpc rpc-${{ matrix.release_for }}
49+
mv target/${{ matrix.target }}/release/metrics-exporter rpc-${{ matrix.release_for }}
50+
mv target/${{ matrix.target }}/release/open-head open-head-${{ matrix.release_for }}
5251
5352
- name: upload artifacts
5453
uses: actions/upload-artifact@v4
5554
with:
5655
name: binaries-${{ matrix.release_for }}
57-
path: operator-${{ matrix.release_for }}${{ matrix.ext }}
56+
path: |
57+
operator-${{ matrix.release_for }}
58+
rpc-${{ matrix.release_for }}
59+
metrics-exporter-${{ matrix.release_for }}
5860
5961
docker:
6062
runs-on: ubuntu-latest
@@ -75,7 +77,7 @@ jobs:
7577
id: meta
7678
uses: docker/metadata-action@v5
7779
with:
78-
images: ghcr.io/cardano-scaling/doom-patrol-operator
80+
images: ghcr.io/cardano-scaling/hydra-control-plane
7981
tags: |
8082
type=raw,value=latest,enable={{is_default_branch}}
8183
type=semver,pattern=v{{major}}
@@ -103,12 +105,15 @@ jobs:
103105
- name: Rename artifacts
104106
run: |+
105107
mv .github/image/bin/operator-Linux-x86_64 .github/image/bin/operator-Linux-amd64
106-
108+
mv .github/image/bin/rpc-Linux-x86_64 .github/image/bin/rpc-Linux-amd64
109+
mv .github/image/bin/metrics-exporter-Linux-x86_64 .github/image/bin/metrics-exporter-Linux-amd64
110+
mv .github/image/bin/open-head-Linux-x86_64 .github/image/bin/open-head-Linux-amd64
111+
107112
- name: Build and push
108113
uses: docker/build-push-action@v5
109114
with:
110-
context: .github/image
111-
platforms: linux/arm64,linux/amd64
115+
context: .github/images/hcp
116+
platforms: linux/amd64
112117
push: true
113118
tags: ${{ steps.meta.outputs.tags }}
114119
labels: ${{ steps.meta.outputs.labels }}

crates/rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name = "metrics-exporter"
1212
path = "src/bin/metric_exporter/main.rs"
1313

1414
[[bin]]
15-
name = "control-plane"
15+
name = "rpc"
1616
path = "src/main.rs"
1717

1818
[dependencies]

crates/rpc/Rocket.toml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,3 @@ ttl_minutes = 1
33
port = 8000
44
address = "0.0.0.0"
55
admin_key_file = "keys/admin.sk"
6-
7-
[[local.nodes]]
8-
local_url = "ws://127.0.0.1"
9-
port = 4001
10-
admin_key_file = "keys/local.admin.sk"
11-
max_players = 5
12-
region = "local"
13-
persisted = false
14-
reserved = false
15-
16-
[ec2]
17-
ttl_minutes = 1
18-
port = 8000
19-
address = "0.0.0.0"
20-
21-
[[ec2.hosts]]
22-
local_url = "wss://host1.hydra-doom.sundae.fi"
23-
start_port = 4001
24-
end_port = 4001
25-
region = "us-east-2"
26-
admin_key_file = "admin.sk"
27-
stats_file_prefix = "stats/host1"
28-
max_players = 10
29-
persisted = false
30-
reserved = true
31-
32-
[[ec2.hosts]]
33-
local_url = "wss://host1.hydra-doom.sundae.fi"
34-
start_port = 4002
35-
end_port = 4010
36-
region = "us-east-2"
37-
admin_key_file = "admin.sk"
38-
stats_file_prefix = "stats/host1"
39-
max_players = 10
40-
persisted = false
41-
reserved = false

0 commit comments

Comments
 (0)