add docker stuff

This commit is contained in:
hexlocation 2025-06-14 16:07:40 +02:00
parent c844ab063b
commit 8c7b09b8d8
2 changed files with 29 additions and 0 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM docker.io/golang:1.24.4-alpine3.22 as compiled
WORKDIR /tmp/src
# Copy the source code into the temp folder.
COPY . /tmp/src
RUN go build -v -o /tmp/src/backend
FROM alpine:latest AS run
COPY --from=compiled /tmp/src/backend /usr/bin/backend
WORKDIR /app
ENV GIN_MODE=release
CMD ["/usr/bin/backend"]

12
compose.yaml Normal file
View file

@ -0,0 +1,12 @@
services:
seaweedfs:
container_name: seaweedfs
image: docker.io/chrislusf/seaweedfs
command: server -dir=/data
volume:
./tmp:/data
ports:
- 9333:9333
shell:
image: docker.io/alpine:latest
command: sh -c 'sleep 100000'