Replace golang api server with python

This commit is contained in:
Eden Kirin
2024-01-10 17:37:48 +01:00
parent 3d3dbd19f0
commit 1027162e39
10 changed files with 43 additions and 208 deletions

View File

@ -1,20 +1,12 @@
FROM golang:1.21-alpine
# disable crosscompiling
ENV CGO_ENABLED=0
# compile linux only
ENV GOOS=linux
FROM python:3.11-slim-bookworm
WORKDIR /app
COPY ./app .
# fetch go libs and build the binary with debug information removed
RUN \
go mod download && \
go mod verify && \
go build -v -ldflags "-s -w" -a -installsuffix cgo -o api-server ./main.go
pip install -r requirements.txt
WORKDIR /app
ENTRYPOINT ["/app/api-server"]
ENTRYPOINT ["/app/run.sh"]