From 20c664f0ed4e81c0879c8d06301d559bdaefbd57 Mon Sep 17 00:00:00 2001 From: restitux Date: Sat, 11 Mar 2023 18:56:13 -0700 Subject: [PATCH] Reorganize docker configuration --- docker/{ => cursorius}/Dockerfile | 0 docker/{ => cursorius}/Dockerfile.dev | 2 +- docker/{ => cursorius}/build-and-run.sh | 0 docker/docker-compose.yml | 11 +++++++---- docker/{ => graphiql}/Dockerfile.graphiql | 0 docker/{ => graphiql}/graphiql.conf | 0 docker/{ => graphiql}/graphiql.html | 0 docker/run-dev.sh | 2 +- 8 files changed, 9 insertions(+), 6 deletions(-) rename docker/{ => cursorius}/Dockerfile (100%) rename docker/{ => cursorius}/Dockerfile.dev (72%) rename docker/{ => cursorius}/build-and-run.sh (100%) rename docker/{ => graphiql}/Dockerfile.graphiql (100%) rename docker/{ => graphiql}/graphiql.conf (100%) rename docker/{ => graphiql}/graphiql.html (100%) diff --git a/docker/Dockerfile b/docker/cursorius/Dockerfile similarity index 100% rename from docker/Dockerfile rename to docker/cursorius/Dockerfile diff --git a/docker/Dockerfile.dev b/docker/cursorius/Dockerfile.dev similarity index 72% rename from docker/Dockerfile.dev rename to docker/cursorius/Dockerfile.dev index d81cbb7..9efc693 100644 --- a/docker/Dockerfile.dev +++ b/docker/cursorius/Dockerfile.dev @@ -4,4 +4,4 @@ MAINTAINER restitux RUN apt-get update && apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* -ENTRYPOINT ["/build/server/docker/build-and-run.sh"] +ENTRYPOINT ["/build/server/docker/cursorius/build-and-run.sh"] diff --git a/docker/build-and-run.sh b/docker/cursorius/build-and-run.sh similarity index 100% rename from docker/build-and-run.sh rename to docker/cursorius/build-and-run.sh diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index fb5abe5..01e7cdc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -2,15 +2,15 @@ version: "3.3" services: cursorius-server: build: - context: .. - dockerfile: docker/Dockerfile.dev + context: ".." + dockerfile: "docker/cursorius/Dockerfile.dev" ports: - "0.0.0.0:45420:45420" networks: - cursorius volumes: - "..:/build/server" - - "../server.toml:/root/.config/cursorius/server.toml" + - "./server.toml:/root/.config/cursorius/server.toml" - "/var/run/docker.sock:/var/run/docker.sock" - "../_working/go:/go" - "../_working/jobs:/cursorius/jobs" @@ -20,11 +20,14 @@ services: - POSTGRES_USER=cursorius - POSTGRES_PASSWORD=cursorius - POSTGRES_DB=cursorius + volumes: + - "../_working/postgres:/var/lib/postgresql/data" networks: - cursorius graphiql: build: - dockerfile: Dockerfile.graphiql + context: "graphiql" + dockerfile: "Dockerfile.graphiql" ports: - "0.0.0.0:45421:80" networks: diff --git a/docker/Dockerfile.graphiql b/docker/graphiql/Dockerfile.graphiql similarity index 100% rename from docker/Dockerfile.graphiql rename to docker/graphiql/Dockerfile.graphiql diff --git a/docker/graphiql.conf b/docker/graphiql/graphiql.conf similarity index 100% rename from docker/graphiql.conf rename to docker/graphiql/graphiql.conf diff --git a/docker/graphiql.html b/docker/graphiql/graphiql.html similarity index 100% rename from docker/graphiql.html rename to docker/graphiql/graphiql.html diff --git a/docker/run-dev.sh b/docker/run-dev.sh index 1329ed6..de2acae 100755 --- a/docker/run-dev.sh +++ b/docker/run-dev.sh @@ -2,4 +2,4 @@ set -e -go run docker/run.go $@ +go run docker/run.go "$@"