Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
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
47 changes: 47 additions & 0 deletions Dockerfile.Payroll.server
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Use the official Go image as the base image
FROM golang:1.24 as builder

# Set the working directory
WORKDIR /app

# Copy go.mod and go.sum to install dependencies
COPY go.mod go.sum ./
RUN go mod download

# Copy the source code
COPY . .

RUN wget https://github.com/vultisig/go-wrappers/archive/refs/heads/master.tar.gz
RUN tar -xzf master.tar.gz && \
cd go-wrappers-master && \
mkdir -p /usr/local/lib/dkls && \
cp --recursive includes /usr/local/lib/dkls

Comment thread
johnnyluo marked this conversation as resolved.
ENV LD_LIBRARY_PATH=/usr/local/lib/dkls/includes/linux/:$LD_LIBRARY_PATH

# Build the application
RUN go build -o server ./cmd/payroll/server

# Use a minimal base image for the final stage
FROM ubuntu:24.04

RUN apt-get update && \
apt-get install -y wget && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the built binary from the builder stage
COPY --from=builder /app/server .
COPY --from=builder /usr/local/lib/dkls /usr/local/lib/dkls
COPY payroll.server.example.json config.json
COPY ./etc/vultisig/payroll.yml /etc/vultisig/payroll.yml

ENV LD_LIBRARY_PATH=/usr/local/lib/dkls/includes/linux/:$LD_LIBRARY_PATH

# Expose the port the application listens on
EXPOSE 8080

# Run the application
CMD ["./server"]
Comment thread
johnnyluo marked this conversation as resolved.
44 changes: 44 additions & 0 deletions Dockerfile.Payroll.worker
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Use the official Go image as the base image
FROM golang:1.24 as builder

# Set the working directory
WORKDIR /app

# Copy go.mod and go.sum to install dependencies
COPY go.mod go.sum ./
RUN go mod download

# Copy the source code
COPY . .

RUN wget https://github.com/vultisig/go-wrappers/archive/refs/heads/master.tar.gz
RUN tar -xzf master.tar.gz && \
cd go-wrappers-master && \
mkdir -p /usr/local/lib/dkls && \
cp --recursive includes /usr/local/lib/dkls
Comment thread
johnnyluo marked this conversation as resolved.

ENV LD_LIBRARY_PATH=/usr/local/lib/dkls/includes/linux/:${LD_LIBRARY_PATH:-}

# Build the application
RUN go build -o worker ./cmd/payroll/worker

# Use a minimal base image for the final stage
FROM ubuntu:24.04

RUN apt-get update && \
apt-get install -y wget && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the built binary from the builder stage
COPY --from=builder /app/worker .
COPY --from=builder /usr/local/lib/dkls /usr/local/lib/dkls
COPY payroll.worker.example.json config.json
COPY ./etc/vultisig/payroll.yml /etc/vultisig/payroll.yml

ENV LD_LIBRARY_PATH=/usr/local/lib/dkls/includes/linux/:${LD_LIBRARY_PATH:-}

# Run the application
CMD ["./worker"]
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ up:
down:
@docker compose down

verifier-server:
@DYLD_LIBRARY_PATH=$(DYLD_LIBRARY) VS_CONFIG_NAME=config-verifier go run cmd/vultisigner/main.go

verifier-worker:
@DYLD_LIBRARY_PATH=$(DYLD_LIBRARY) VS_CONFIG_NAME=config-verifier go run cmd/worker/main.go

plugin-server:
@DYLD_LIBRARY_PATH=$(DYLD_LIBRARY) VS_CONFIG_NAME=config-plugin go run cmd/vultisigner/main.go

plugin-worker:
@DYLD_LIBRARY_PATH=$(DYLD_LIBRARY) VS_CONFIG_NAME=config-plugin go run cmd/worker/main.go

# Dump database schema
# Usage: make dump-schema CONFIG=config-plugin.yaml
Expand Down
Loading