Skip to content

Commit

Permalink
Add avalanche
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Nov 13, 2024
1 parent a9a52f2 commit 1e66aeb
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ crates/**/.privkey

test/summit-legacy/cache
test/summit-legacy/db
test/avalanche-legacy/cache
test/avalanche-legacy/db
64 changes: 64 additions & 0 deletions Dockerfile-legacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM debian:bookworm AS builder
RUN apt update
RUN apt install -y \
build-essential \
curl \
wget \
git \
libcurl4-openssl-dev \
libdbus-1-dev \
liblmdb-dev \
libsodium-dev \
libssl-dev \
libxml2-dev \
libxxhash-dev \
libzstd-dev \
zlib1g-dev
RUN mkdir -p ~/dlang && wget https://dlang.org/install.sh -O ~/dlang/install.sh
RUN chmod +x ~/dlang/install.sh
RUN ~/dlang/install.sh install ldc-1.32.2
RUN git clone https://github.com/serpent-os/libmoss.git
RUN git clone https://github.com/serpent-os/moss-service.git
RUN git clone https://github.com/serpent-os/summit.git
RUN git clone https://github.com/serpent-os/avalanche.git
RUN --mount=type=cache,target=/root/.dub <<"EOT" /bin/bash
source ~/dlang/ldc-1.32.2/activate
cd summit
dub build --parallel
EOT
RUN --mount=type=cache,target=/root/.dub <<"EOT" /bin/bash
source ~/dlang/ldc-1.32.2/activate
cd avalanche
dub build --parallel
EOT

FROM debian:bookworm-slim AS base
RUN apt update
RUN apt install -y \
git \
libcurl4 \
libdbus-1-3 \
liblmdb0 \
libsodium23 \
libssl3 \
libxml2 \
libxxhash0 \
libzstd1 \
zlib1g
RUN rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

FROM base as summit
COPY --from=builder /summit /app
VOLUME /app/state
EXPOSE 5000
WORKDIR /app
CMD ["/app/summit", "-a", "0.0.0.0", "-p", "5000"]

FROM base as avalanche
COPY --from=builder /avalanche /app
RUN mkdir -p /app/public
RUN mkdir -p /var/cache/boulder
VOLUME /app/state
EXPOSE 5002
WORKDIR /app
CMD ["/app/avalanche", "-a", "0.0.0.0", "-p", "5002"]
32 changes: 0 additions & 32 deletions Dockerfile-legacy-summit

This file was deleted.

6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ docker-build target:
@docker build . -t serpentos/{{target}} --target {{target}}

[private]
docker-build-legacy:
@docker build . -t serpentos/summit-legacy -f Dockerfile-legacy-summit
docker-build-legacy target:
@docker build . -t serpentos/{{target}}-legacy --target {{target}} -f Dockerfile-legacy

# Build docker containers
build: docker-build-legacy (docker-build "vessel")
build: (docker-build-legacy "summit") (docker-build-legacy "avalanche") (docker-build "vessel")

# Bring up docker containers
up: build
Expand Down
1 change: 1 addition & 0 deletions test/avalanche-legacy/.privkey
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wB���;"���ӿqjT�����S��� W���{���b.�L(�>��)�S�C�Fs��~ì#��
1 change: 1 addition & 0 deletions test/avalanche-legacy/.pubkey
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
���b.�L(�>��)�S�C�Fs��~ì#��
1 change: 1 addition & 0 deletions test/avalanche-legacy/.seed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wB���;"���ӿqjT�����S��� W���{
9 changes: 8 additions & 1 deletion test/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
ports:
- "5000:5000"
volumes:
- ./summit-legacy:/summit/state
- ./summit-legacy:/app/state
user: ${MY_UID}:${MY_GID}
vessel:
image: serpentos/vessel
Expand All @@ -24,3 +24,10 @@ services:
volumes:
- ./vessel:/state
user: ${MY_UID}:${MY_GID}
avalanche:
image: serpentos/avalanche-legacy
ports:
- "5002:5002"
volumes:
- ./avalanche-legacy:/app/state
user: ${MY_UID}:${MY_GID}

0 comments on commit 1e66aeb

Please sign in to comment.