From b60ebf231cb0e49d3ebb65ab80bae91da5edfefa Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 17 Mar 2026 14:06:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E6=B7=BB=E5=8A=A0=20Doc?= =?UTF-8?q?ker=20Compose=20=E9=85=8D=E7=BD=AE=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20PostgreSQL=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=92=8C=20Openflar?= =?UTF-8?q?e=20=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openflare_server/.dockerignore | 10 ++++++++ openflare_server/docker-compose.yaml | 35 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 openflare_server/.dockerignore create mode 100644 openflare_server/docker-compose.yaml diff --git a/openflare_server/.dockerignore b/openflare_server/.dockerignore new file mode 100644 index 00000000..a6ed8cd9 --- /dev/null +++ b/openflare_server/.dockerignore @@ -0,0 +1,10 @@ +web/node_modules +web/.next +web/build +web/out + +upload +logs + +.git +.github diff --git a/openflare_server/docker-compose.yaml b/openflare_server/docker-compose.yaml new file mode 100644 index 00000000..4d324d34 --- /dev/null +++ b/openflare_server/docker-compose.yaml @@ -0,0 +1,35 @@ +services: + postgres: + image: postgres:17-alpine + restart: unless-stopped + environment: + POSTGRES_DB: openflare + POSTGRES_USER: openflare + POSTGRES_PASSWORD: replace-with-strong-password + volumes: + - ./postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U openflare -d openflare"] + interval: 10s + timeout: 5s + retries: 5 + + openflare: + build: + dockerfile: Dockerfile + restart: unless-stopped + depends_on: + postgres: + condition: service_healthy + ports: + - "3000:3000" + environment: + SESSION_SECRET: replace-with-random-string + SQLITE_PATH: /data/openflare.db + DSN: postgres://openflare:replace-with-strong-password@postgres:5432/openflare?sslmode=disable + GIN_MODE: release + LOG_LEVEL: info + + volumes: + - ./openflare-data:/data +