From 16cc6bed77e8a27487cad8680e135f4b2a126220 Mon Sep 17 00:00:00 2001 From: chunzhi <60135925+chunzhimoe@users.noreply.github.com> Date: Thu, 11 May 2023 15:07:33 +0800 Subject: [PATCH] Create docker-compose.yml --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..1d07cd4f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3.4' + +services: + one-api: + image: justsong/one-api + container_name: one-api + restart: always + ports: + - "3000:3000" + volumes: + - /home/ubuntu/data/one-api:/data + # environment: + # REDIS_CONN_STRING: redis://default:redispw@localhost:49153 + # SESSION_SECRET: random_string + # SQL_DSN: root:123456@tcp(localhost:3306)/one-api + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/healthz"] + interval: 30s + timeout: 10s + retries: 3