From 2da803d52d708071ac8bd9c34bc237e4057fbd6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9A=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8E=D0=BD=D0=B8=D1=87=D0=B5=D0=B2?= Date: Fri, 11 Jul 2025 15:50:50 +0300 Subject: [PATCH] local build --- .gitignore | 2 +- docker-compose.yml | 34 ++++++++++++++++++++++++++++++++++ start.sh | 3 +++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml create mode 100644 start.sh diff --git a/.gitignore b/.gitignore index ae56830a..301f1c16 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ cookies.json keys.json # docker -docker-compose.yml +# docker-compose.yml # ide .vscode diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..b1d4b5db --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +services: + cobalt-api: + build: + context: . + dockerfile: Dockerfile + + working_dir: /app + + init: true + read_only: true + restart: unless-stopped + container_name: cobalt-api + + ports: + - 9000:9000/tcp + + environment: + API_URL: "http://localhost:9000/" + API_AUTH_REQUIRED: 1 + API_KEY_URL: "file:///keys.json" + + labels: + - com.centurylinklabs.watchtower.scope=cobalt + + volumes: + - ./keys.json:/keys.json:ro + + # watchtower updates the cobalt image automatically + watchtower: + image: ghcr.io/containrrr/watchtower + restart: unless-stopped + command: --cleanup --scope cobalt --interval 900 --include-restarting + volumes: + - /var/run/docker.sock:/var/run/docker.sock diff --git a/start.sh b/start.sh new file mode 100644 index 00000000..1bccf612 --- /dev/null +++ b/start.sh @@ -0,0 +1,3 @@ +#/bin/bash +docker compose down +docker compose up -d