Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag payjoin-directory v0.0.1 #413

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions payjoin-directory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# payjoin-directory Changelog

## 0.0.1

- Release initial payjoin-directory to store and forward payjoin payloads using secp256k1 hpke
37 changes: 37 additions & 0 deletions payjoin-directory/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Use the official Rust image as the builder
FROM --platform=linux/amd64 rust:1.75-slim as builder

WORKDIR /usr/src/payjoin-directory

# Install cross-compilation dependencies
RUN apt-get update && \
apt-get install -y \
build-essential \
musl-tools \
musl-dev \
pkg-config \
gcc-multilib \
&& rm -rf /var/lib/apt/lists/*

# Set the linker
ENV CC_x86_64_unknown_linux_musl=musl-gcc
ENV AR_x86_64_unknown_linux_musl=ar

# Add the x86_64-unknown-linux-musl target
RUN rustup target add x86_64-unknown-linux-musl

# Copy the manifest and source code
COPY payjoin-directory/Cargo.toml ./
COPY payjoin-directory/src/ ./src/

# Build the binary
RUN cargo build --release --target x86_64-unknown-linux-musl

# Create final minimal image
FROM --platform=linux/amd64 alpine:latest

# Copy the binary from builder
COPY --from=builder /usr/src/payjoin-directory/target/x86_64-unknown-linux-musl/release/payjoin-directory ./

# Run the binary
ENTRYPOINT ["./payjoin-directory"]
55 changes: 55 additions & 0 deletions payjoin-directory/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: '3.8'

services:
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/logs:/var/log/nginx
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/certs:/etc/ssl/certs
- ./nginx/html:/var/www/html
networks:
- payjoin-network

certbot:
image: certbot/certbot
volumes:
- ./nginx/certs:/etc/letsencrypt
- ./nginx/html:/var/www/html
entrypoint: /bin/sh -c 'trap exit TERM; while :; do certbot renew --webroot -w /var/www/html --deploy-hook "nginx -s reload"; sleep 12h & wait $${!}; done;'
depends_on:
- nginx
networks:
- payjoin-network

payjoin-directory:
image: dangould/payjoin-directory:0.0.1
environment:
RUST_LOG: "trace"
PJ_DB_HOST: "redis:6379"
PJ_DIR_PORT: "8080"
ports:
- "8080:8080"
depends_on:
- redis
networks:
- payjoin-network

redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- payjoin-network

networks:
payjoin-network:
driver: bridge

volumes:
redis-data:
Loading