File size: 618 Bytes
784ab0d
776bfbd
784ab0d
 
 
 
 
 
 
 
 
 
 
 
6b10e4d
 
784ab0d
6b10e4d
784ab0d
 
 
 
6b10e4d
 
784ab0d
6b10e4d
784ab0d
 
 
6b10e4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Stage 1: Build from source
FROM golang:1.25-alpine AS builder

RUN apk add --no-cache git ca-certificates

WORKDIR /app

# Clone the repository
RUN git clone https://github.com/ycvk/monica-proxy.git .

# Download dependencies and build
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o monica-proxy main.go

# Stage 2: Runtime with Python proxy
FROM python:3.11-alpine

RUN apk --no-cache add ca-certificates tzdata

WORKDIR /app

COPY --from=builder /app/monica-proxy .
COPY index.html .
COPY server.py .

RUN pip install --no-cache-dir aiohttp

EXPOSE 7860

CMD ["python", "server.py"]