From 159532dc5a1a0c55279d566d53f72599abdb8f20 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:48:11 +0200 Subject: [PATCH 1/4] add wallet dockerfile --- Dockerfile => Dockerfile.mint | 0 Dockerfile.wallet | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) rename Dockerfile => Dockerfile.mint (100%) create mode 100644 Dockerfile.wallet diff --git a/Dockerfile b/Dockerfile.mint similarity index 100% rename from Dockerfile rename to Dockerfile.mint diff --git a/Dockerfile.wallet b/Dockerfile.wallet new file mode 100644 index 00000000..8ee8f4af --- /dev/null +++ b/Dockerfile.wallet @@ -0,0 +1,16 @@ +FROM python:3.9-slim +RUN apt-get update +RUN apt-get install -y curl python3-dev autoconf g++ +RUN apt-get install -y libpq-dev + +# Deps for building secp256k1-py +RUN apt-get install -y build-essential automake pkg-config libtool libffi-dev + +RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PATH="/root/.local/bin:$PATH" +WORKDIR /app +COPY . . +RUN poetry config virtualenvs.create false +RUN poetry install --no-dev --no-root +EXPOSE 4448 +CMD ["poetry", "run", "cashu", "-d"] From fb2d484503ee417d4df00f1cca9eb74bfb5d5dec Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:08:19 +0200 Subject: [PATCH 2/4] add wallet to docker compose --- Dockerfile.mint | 16 ---------------- Dockerfile.wallet | 16 ---------------- docker-compose.yaml | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 32 deletions(-) delete mode 100644 Dockerfile.mint delete mode 100644 Dockerfile.wallet create mode 100644 docker-compose.yaml diff --git a/Dockerfile.mint b/Dockerfile.mint deleted file mode 100644 index b1fb42ca..00000000 --- a/Dockerfile.mint +++ /dev/null @@ -1,16 +0,0 @@ -FROM python:3.9-slim -RUN apt-get update -RUN apt-get install -y curl python3-dev autoconf g++ -RUN apt-get install -y libpq-dev - -# Deps for building secp256k1-py -RUN apt-get install -y build-essential automake pkg-config libtool libffi-dev - -RUN curl -sSL https://install.python-poetry.org | python3 - -ENV PATH="/root/.local/bin:$PATH" -WORKDIR /app -COPY . . -RUN poetry config virtualenvs.create false -RUN poetry install --no-dev --no-root -EXPOSE 3338 -CMD ["poetry", "run", "mint", "--port", "3338", "--host", "0.0.0.0"] diff --git a/Dockerfile.wallet b/Dockerfile.wallet deleted file mode 100644 index 8ee8f4af..00000000 --- a/Dockerfile.wallet +++ /dev/null @@ -1,16 +0,0 @@ -FROM python:3.9-slim -RUN apt-get update -RUN apt-get install -y curl python3-dev autoconf g++ -RUN apt-get install -y libpq-dev - -# Deps for building secp256k1-py -RUN apt-get install -y build-essential automake pkg-config libtool libffi-dev - -RUN curl -sSL https://install.python-poetry.org | python3 - -ENV PATH="/root/.local/bin:$PATH" -WORKDIR /app -COPY . . -RUN poetry config virtualenvs.create false -RUN poetry install --no-dev --no-root -EXPOSE 4448 -CMD ["poetry", "run", "cashu", "-d"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..fc6117d7 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,23 @@ +version: "3" +services: + mint: + build: + context: . + dockerfile: Dockerfile + container_name: mint + ports: + - "3338:3338" + command: ["poetry", "run", "mint", "--port", "3338", "--host", "0.0.0.0"] + wallet: + build: + context: . + dockerfile: Dockerfile + container_name: wallet + ports: + - "4448:4448" + depends_on: + - mint + environment: + - MINT_URL=http://mint:3338 + - API_HOST=0.0.0.0 + command: ["poetry", "run", "cashu", "-d"] From 3001ece54bc9df192dd0904a03fea833b782a763 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:08:55 +0200 Subject: [PATCH 3/4] add dockerfile --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5f3361d4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.9-slim +RUN apt-get update +RUN apt-get install -y curl python3-dev autoconf g++ +RUN apt-get install -y libpq-dev + +# Deps for building secp256k1-py +RUN apt-get install -y build-essential automake pkg-config libtool libffi-dev + +RUN curl -sSL https://install.python-poetry.org | python3 - +ENV PATH="/root/.local/bin:$PATH" +WORKDIR /app +COPY . . +RUN poetry config virtualenvs.create false +RUN poetry install --no-dev --no-root +EXPOSE 3338 4448 From 6e2a053d1b821ce811a06f423e29e8277faea707 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:08:35 +0200 Subject: [PATCH 4/4] remove expose --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5f3361d4..6d65364a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,3 @@ WORKDIR /app COPY . . RUN poetry config virtualenvs.create false RUN poetry install --no-dev --no-root -EXPOSE 3338 4448