-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfiles and update README for Docker
- Loading branch information
1 parent
3663f4b
commit 95db29c
Showing
6 changed files
with
98 additions
and
10 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,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ ! -d "haven" ] || [ ! -d "tribler" ]; then | ||
echo "haven or tribler directory not found. Are you in the right directory (build)?" | ||
exit 1 | ||
fi | ||
|
||
cd haven | ||
echo -e "\n=== Building Haven ===\n" | ||
docker build -t haven-for-tribler:latest . | ||
|
||
cd ../tribler | ||
echo -e "\n=== Building Tribler ===\n" | ||
docker build -t tribler-haven:latest . | ||
cd ../ | ||
|
||
echo -e "\n=== Done! List tribler-related images ===\n" | ||
docker images | grep tribler | ||
|
||
|
||
echo -e '''\n | ||
Edit tribler/compose.yaml and in that directory create "tribler-downloads" subdirectory for Tribler downloads: | ||
cd tribler | ||
vim compose.yaml | ||
mkdir tribler-downloads | ||
docker compose up | ||
After the container is up, you can access Haven at http://localhost:3000 and see a Tribler iFrame on the same page. | ||
If you change CORE_API_KEY, you need to set the same password in the Haven patch, and rebuild Haven container. | ||
''' |
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 @@ | ||
# AA: Use Ubuntu 24.04 instead of the official Dockerfile's 20.04 | ||
FROM ubuntu:24.04 | ||
|
||
ARG SPEAKEASY_VER="main" | ||
ENV SPEAKEASY_VER=$SPEAKEASY_VER | ||
|
||
# AA: Set the timezone to London | ||
ENV TZ="Europe/London" \ | ||
DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl git patch tzdata | ||
|
||
# AA: Install Node.js 18.x instead of the official Dockerfile's 16.x | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs | ||
|
||
ARG GIT_REPO=${GIT_REPO:-"https://git.xx.network/elixxir/speakeasy-web.git"} | ||
ARG GIT_COMMIT_SHA="5afa715e257cf78a42173f5cf5785e339095a46b" | ||
|
||
# RUN mkdir /speakeasy-web && git clone --depth=1 -b $SPEAKEASY_VER https://git.xx.network/elixxir/speakeasy-web.git /speakeasy-web && cd /speakeasy-web && npm install && npm run build | ||
# AA: Modify the above "official" line to allow for patching the DefaultLayout.tsx file | ||
RUN mkdir /speakeasy-web && git clone --depth=1 -b $SPEAKEASY_VER ${GIT_REPO} /speakeasy-web | ||
ADD haven-DefaultLayout.tsx.patch /speakeasy-web/haven-DefaultLayout.tsx.patch | ||
WORKDIR /speakeasy-web | ||
RUN git reset --hard ${GIT_COMMIT_SHA} && patch -p1 --backup-if-mismatch src/layouts/DefaultLayout/DefaultLayout.tsx haven-DefaultLayout.tsx.patch && npm install && npm run build | ||
|
||
ENTRYPOINT [ "npm", "run", "start" ] |
File renamed without changes.
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
File renamed without changes.