Skip to content

Commit 4640300

Browse files
authored
Merge pull request #4 from akihikokuroda/server
fix workflow deploy command
2 parents ecb10e1 + d17c8fc commit 4640300

File tree

9 files changed

+818
-394
lines changed

9 files changed

+818
-394
lines changed

Dockerfile-deploy

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Build stage
2+
FROM golang:1.24 AS builder
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy go.mod and go.sum files for dependency resolution
8+
COPY go.mod go.sum ./
9+
10+
# Download dependencies
11+
RUN go mod download
12+
13+
# Copy the source code
14+
COPY . .
15+
16+
# Build the API executable
17+
RUN cd deployments && go build -o api api.go
18+
19+
# Final stage
20+
FROM debian:bookworm-slim
21+
22+
# Set working directory
23+
WORKDIR /app
24+
25+
# Install necessary runtime dependencies
26+
RUN apt-get update && apt-get install -y --no-install-recommends \
27+
ca-certificates \
28+
&& rm -rf /var/lib/apt/lists/*
29+
30+
# Copy the API binary from the builder stage
31+
COPY --from=builder /app/deployments/api /app/api
32+
33+
# Copy the HTML file to the same directory as the API executable
34+
COPY deployments/maestro.html /app/maestro.html
35+
36+
# Create src directory and copy YAML files
37+
RUN mkdir -p /app/src
38+
# for embedded yaml files
39+
# COPY deployments/src/agents.yaml /app/src/agents.yaml
40+
# COPY deployments/src/workflow.yaml /app/src/workflow.yaml
41+
42+
# Make the API executable
43+
RUN chmod +x /app/api
44+
45+
# Set environment variables
46+
ENV HOST=0.0.0.0
47+
ENV PORT=8080
48+
49+
# Expose the port
50+
EXPOSE 8080
51+
52+
# Set the entry point
53+
ENTRYPOINT ["/app/api"]

0 commit comments

Comments
 (0)