add docker stuff
This commit is contained in:
parent
c844ab063b
commit
8c7b09b8d8
2 changed files with 29 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
12
compose.yaml
Normal 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'
|
Loading…
Add table
Add a link
Reference in a new issue