Skip to content

Commit 52d19ae

Browse files
authored
Tag payjoin-directory v0.0.1 (payjoin#413)
2 parents bcbbd2b + 7703785 commit 52d19ae

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

payjoin-directory/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# payjoin-directory Changelog
2+
3+
## 0.0.1
4+
5+
- Release initial payjoin-directory to store and forward payjoin payloads using secp256k1 hpke

payjoin-directory/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Use the official Rust image as the builder
2+
FROM --platform=linux/amd64 rust:1.75-slim as builder
3+
4+
WORKDIR /usr/src/payjoin-directory
5+
6+
# Install cross-compilation dependencies
7+
RUN apt-get update && \
8+
apt-get install -y \
9+
build-essential \
10+
musl-tools \
11+
musl-dev \
12+
pkg-config \
13+
gcc-multilib \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Set the linker
17+
ENV CC_x86_64_unknown_linux_musl=musl-gcc
18+
ENV AR_x86_64_unknown_linux_musl=ar
19+
20+
# Add the x86_64-unknown-linux-musl target
21+
RUN rustup target add x86_64-unknown-linux-musl
22+
23+
# Copy the manifest and source code
24+
COPY payjoin-directory/Cargo.toml ./
25+
COPY payjoin-directory/src/ ./src/
26+
27+
# Build the binary
28+
RUN cargo build --release --target x86_64-unknown-linux-musl
29+
30+
# Create final minimal image
31+
FROM --platform=linux/amd64 alpine:latest
32+
33+
# Copy the binary from builder
34+
COPY --from=builder /usr/src/payjoin-directory/target/x86_64-unknown-linux-musl/release/payjoin-directory ./
35+
36+
# Run the binary
37+
ENTRYPOINT ["./payjoin-directory"]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: '3.8'
2+
3+
services:
4+
nginx:
5+
image: nginx:latest
6+
ports:
7+
- "80:80"
8+
- "443:443"
9+
volumes:
10+
- ./nginx/logs:/var/log/nginx
11+
- ./nginx/conf.d:/etc/nginx/conf.d
12+
- ./nginx/certs:/etc/ssl/certs
13+
- ./nginx/html:/var/www/html
14+
networks:
15+
- payjoin-network
16+
17+
certbot:
18+
image: certbot/certbot
19+
volumes:
20+
- ./nginx/certs:/etc/letsencrypt
21+
- ./nginx/html:/var/www/html
22+
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;'
23+
depends_on:
24+
- nginx
25+
networks:
26+
- payjoin-network
27+
28+
payjoin-directory:
29+
image: dangould/payjoin-directory:0.0.1
30+
environment:
31+
RUST_LOG: "trace"
32+
PJ_DB_HOST: "redis:6379"
33+
PJ_DIR_PORT: "8080"
34+
ports:
35+
- "8080:8080"
36+
depends_on:
37+
- redis
38+
networks:
39+
- payjoin-network
40+
41+
redis:
42+
image: redis:latest
43+
ports:
44+
- "6379:6379"
45+
volumes:
46+
- redis-data:/data
47+
networks:
48+
- payjoin-network
49+
50+
networks:
51+
payjoin-network:
52+
driver: bridge
53+
54+
volumes:
55+
redis-data:

0 commit comments

Comments
 (0)