This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #113 from c4dt/archive
add docker-compose
- Loading branch information
Showing
14 changed files
with
167 additions
and
71 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
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 @@ | ||
/services/ |
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,3 @@ | ||
/build/ | ||
/cothority/ | ||
/proto/ |
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,29 +1,31 @@ | ||
FROM debian:stretch-slim | ||
FROM golang:1 as builder | ||
|
||
COPY build/*.go build/go.* /src/main/ | ||
COPY *.go go.* /backend/ | ||
COPY cothority/ /backend/cothority/ | ||
COPY proto/ /backend/proto/ | ||
COPY stainless/ /backend/stainless/ | ||
|
||
RUN cd /src/main && go build -v -o /conode | ||
|
||
FROM debian:bookworm-slim as runner | ||
|
||
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 | ||
RUN mkdir -p /usr/share/man/man1 | ||
# libgomp is needed for z3 | ||
RUN apt-get update; \ | ||
apt-get install --no-install-recommends --yes \ | ||
procps \ | ||
openjdk-8-jre-headless \ | ||
libgomp1 \ | ||
unzip \ | ||
; apt-get clean | ||
# Backports needed for 'npm'... | ||
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list | ||
RUN apt-get update; \ | ||
apt-get install --target-release stretch-backports --no-install-recommends --yes \ | ||
npm \ | ||
; apt-get clean | ||
RUN npm install --global solc@0.5.10 | ||
|
||
COPY build/conode.Linux.x86_64 /usr/local/bin/conode | ||
RUN apt update \ | ||
&& apt install --no-install-recommends --yes \ | ||
procps \ | ||
openjdk-17-jre-headless \ | ||
libgomp1 \ | ||
npm \ | ||
unzip \ | ||
&& apt clean | ||
RUN npm install --global solc@0.5 | ||
|
||
COPY build/cvc4 /usr/local/bin/ | ||
|
||
COPY build/stainless.zip /tmp/ | ||
RUN unzip -d /usr/local/bin /tmp/stainless.zip && rm -f /tmp/stainless.zip | ||
# see https://github.com/epfl-lara/smart/issues/12 | ||
RUN chmod o+r /usr/local/bin/lib/scalaz3-unix-64-2.12.jar | ||
|
||
COPY --from=builder /conode /usr/local/bin/conode | ||
|
||
ENTRYPOINT ["/usr/local/bin/conode"] |
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,54 @@ | ||
version: "3" | ||
|
||
services: | ||
conode-1: | ||
image: c4dt/service-stainless-backend:latest | ||
build: | ||
context: backend | ||
volumes: | ||
- ./backend/build/conode-1:/config | ||
network_mode: host | ||
command: "-d 2 -c /config/private.toml server" | ||
environment: | ||
- CONODE_SERVICE_PATH=/config | ||
- DEBUG_COLOR=true | ||
conode-2: | ||
image: c4dt/service-stainless-backend:latest | ||
build: | ||
context: backend | ||
network_mode: host | ||
volumes: | ||
- ./backend/build/conode-2:/config | ||
command: "-d 2 -c /config/private.toml server" | ||
environment: | ||
- CONODE_SERVICE_PATH=/config | ||
- DEBUG_COLOR=true | ||
conode-3: | ||
image: c4dt/service-stainless-backend:latest | ||
build: | ||
context: backend | ||
network_mode: host | ||
volumes: | ||
- ./backend/build/conode-3:/config | ||
command: "-d 2 -c /config/private.toml server" | ||
environment: | ||
- CONODE_SERVICE_PATH=/config | ||
- DEBUG_COLOR=true | ||
conode-4: | ||
image: c4dt/service-stainless-backend:latest | ||
build: | ||
context: backend | ||
network_mode: host | ||
volumes: | ||
- ./backend/build/conode-4:/config | ||
command: "-d 2 -c /config/private.toml server" | ||
environment: | ||
- CONODE_SERVICE_PATH=/config | ||
- DEBUG_COLOR=true | ||
demo: | ||
image: c4dt/service-stainless-demo:latest | ||
build: | ||
context: webapp | ||
network_mode: host | ||
volumes: | ||
- ./webapp/src/assets:/webapp/assets |
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,2 @@ | ||
/dist/ | ||
/node_modules/ |
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 @@ | ||
/node_modules/ |
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,16 @@ | ||
FROM node:16-alpine AS builder | ||
|
||
WORKDIR /webapp | ||
|
||
COPY package*.json . | ||
RUN npm ci | ||
|
||
COPY . . | ||
RUN npx ng build --prod | ||
|
||
FROM joseluisq/static-web-server:2 AS runner | ||
|
||
COPY --from=builder /webapp/dist /webapp | ||
|
||
WORKDIR /webapp | ||
ENV SERVER_ROOT=/webapp |
Empty file.
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 @@ | ||
/*.toml |
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 +1,2 @@ | ||
cothority/ | ||
/proto.d.ts | ||
/proto.js |
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