Skip to content

Commit

Permalink
Merge remote-tracking branch 'wot/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
SmithSamuelM committed Jul 26, 2024
2 parents 571bca1 + c83904d commit 37ebd7b
Show file tree
Hide file tree
Showing 19 changed files with 1,830 additions and 628 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ All Agent db access is through the associated Agent.
make build-keria
```

#### Run with docker
* Specify an entrypoint with proper configuration, for instance if you want to use the demo-witness-oobis that is under the scripts/keri/cf dir:
```
ENTRYPOINT ["keria", "start", "--config-file", "demo-witness-oobis", "--config-dir", "./scripts"]
```
You can see a [working example here](https://github.com/WebOfTrust/signify-ts/blob/main/docker-compose.yaml).

### Running Tests

Expand Down
57 changes: 6 additions & 51 deletions images/keria.dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,10 @@
# Builder stage
FROM python:3.12-alpine3.19 as builder
FROM weboftrust/keri:1.2.0-dev6

# Install compilation dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libffi-dev \
libsodium \
libsodium-dev
WORKDIR /usr/local/var

SHELL ["/bin/bash", "-c"]
RUN mkdir keria
COPY . /usr/local/var/keria

# Install Rust for blake3 dependency build
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
WORKDIR /usr/local/var/keria

WORKDIR /keria

RUN python -m venv venv
ENV PATH=/keria/venv/bin:${PATH}
RUN pip install --upgrade pip

# Copy in Python dependency files
COPY requirements.txt setup.py ./
# "src/" dir required for installation of dependencies with setup.py
RUN mkdir /keria/src
# Install Python dependencies
RUN . "$HOME/.cargo/env" && \
pip install -r requirements.txt

# Runtime stage
FROM python:3.12-alpine3.19

# Install runtime dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libsodium-dev

WORKDIR /keria

# Copy over compiled dependencies
COPY --from=builder /keria /keria
# Copy in KERIA source files - enables near instantaneous builds for source only changes
RUN mkdir -p /usr/local/var/keri
ENV KERI_AGENT_CORS=${KERI_AGENT_CORS:-false}
ENV PATH=/keria/venv/bin:${PATH}

EXPOSE 3901
EXPOSE 3902
EXPOSE 3903

COPY src/ src/

ENTRYPOINT ["keria", "start", "--config-file", "demo-witness-oobis", "--config-dir", "./scripts"]
RUN pip install -r requirements.txt
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
python_requires='>=3.12.2',
install_requires=[
'hio>=0.6.12',
'keri==1.2.0-dev4',
'keri>=1.2.0.dev8',
'mnemonic>=0.20',
'multicommand>=1.0.0',
'falcon>=3.1.3',
Expand Down
Loading

0 comments on commit 37ebd7b

Please sign in to comment.