Cleanup docker development setup

This commit is contained in:
2022-12-24 17:05:57 -07:00
parent c1ad692817
commit 91f0410485
11 changed files with 78 additions and 48 deletions
+1 -2
View File
@@ -1,3 +1,2 @@
*.yml
*.toml *.toml
test working
+2 -1
View File
@@ -1,2 +1,3 @@
working
server
server.toml server.toml
server-dind.toml
-14
View File
@@ -1,14 +0,0 @@
FROM golang:1.19-bullseye as builder
MAINTAINER restitux <restitux@ohea.xyz>
COPY . /server
WORKDIR /server
RUN go build .
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /server/server /server
ENTRYPOINT ["/server"]
-11
View File
@@ -1,11 +0,0 @@
version: "3.3"
services:
cursorius-server:
build:
context: .
dockerfile: ./Dockerfile
ports:
- "0.0.0.0:45420:45420"
volumes:
- "./server.toml:/root/.config/cursorius/server.toml"
- "/var/run/docker.sock:/var/run/docker.sock"
+20
View File
@@ -0,0 +1,20 @@
FROM golang:1.19-bullseye as builder
MAINTAINER restitux <restitux@ohea.xyz>
# Install connect proto build deps
RUN go install github.com/bufbuild/buf/cmd/buf@latest && \
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest && \
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
go install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@latest
COPY . /server
WORKDIR /server
RUN go build .
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /server/server /server
ENTRYPOINT ["/server"]
+13
View File
@@ -0,0 +1,13 @@
FROM golang:1.19-bullseye
MAINTAINER restitux <restitux@ohea.xyz>
# Install connect proto build deps
RUN GOPATH="/go-bin" go install github.com/bufbuild/buf/cmd/buf@latest && \
GOPATH="/go-bin" go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest && \
GOPATH="/go-bin" go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
GOPATH="/go-bin" go install github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@latest
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/build/docker/build-and-run.sh"]
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
cd /build
go build .
./server
+13
View File
@@ -0,0 +1,13 @@
version: "3.3"
services:
cursorius-server:
build:
context: ..
dockerfile: docker/Dockerfile.dev
ports:
- "0.0.0.0:45420:45420"
volumes:
- "..:/build"
- "../server.toml:/root/.config/cursorius/server.toml"
- "/var/run/docker.sock:/var/run/docker.sock"
- "../working/go:/go-src"
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
set -e
mkdir -p working
case $1 in
"default")
docker compose -f docker/docker-compose.yml down
docker compose -f docker/docker-compose.yml -f docker/webhook-override.yml down
docker compose -f docker/docker-compose.yml up --build -d
docker compose -f docker/docker-compose.yml logs -f;;
"webhook")
docker compose -f docker/docker-compose.yml down
docker compose -f docker/docker-compose.yml -f docker/webhook-override.yml down
docker compose -f docker/docker-compose.yml -f docker/webhook-override.yml up --build -d
docker compose -f docker/docker-compose.yml -f docker/webhook-override.yml logs -f;;
*) echo "ERROR: Unknown param \"$1\"" 2>&1
exit 255;;
esac
@@ -1,16 +1,8 @@
version: "3.3" version: "3.3"
services: services:
cursorius-server: cursorius-server:
build:
context: ..
dockerfile: ./Dockerfile
networks: networks:
- gitea - gitea
ports:
- "0.0.0.0:45420:45420"
volumes:
- "../server.toml:/root/.config/cursorius/server.toml"
- "/var/run/docker.sock:/var/run/docker.sock"
gitea: gitea:
image: gitea/gitea:latest image: gitea/gitea:latest
environment: environment:
-12
View File
@@ -1,12 +0,0 @@
version: "3.3"
services:
cursorius-server:
build:
context: .
dockerfile: ./Dockerfile
ports:
- "0.0.0.0:45420:45420"
volumes:
- "./server.toml:/root/.config/cursorius/server.toml"
- "/home/robby/development/restitux/ohea/cursorius/test/server/job:/job"
- "/var/run/docker.sock:/var/run/docker.sock"