Sign inSign up

contful/console

By contful

•Updated 5 months ago

Contful Headless CMS Console

Image
Web servers
1

1.1K

contful/console repository overview

Contful 开源 Headless CMS,多站点管理 · 灵活内容模型 · 强大的 API. 官网:https://contful.com⁠

此镜像为管理控制台,镜像目前分为 PostgreSQL、达梦数据库;

contful/console 管理控制台,管理数据入库 contful/openapi 开放API,从库中读取数据

# =============================================================================
# Contful Docker 编排配置
# =============================================================================
#
# 两种配置模式:
#
# 模式1: 环境变量模式(推荐)
#   - 不需要挂载配置文件
#   - 所有配置通过环境变量传递
#   - 适合容器编排系统(K8s、Swarm)
#
# 模式2: 配置文件模式
#   - 挂载 conf/console.yaml / conf/openapi.yaml
#   - 适合需要自定义复杂配置的场景
#
# 快速启动(环境变量模式):
#   1. 在 contful/ 目录创建 .env 文件:
#      cp .env.example .env
#      # 编辑 .env,填入 DB_PASSWORD、REDIS_PASSWORD、SECRET
#   2. 启动服务:
#      docker-compose -f docker/docker-compose.yaml --env-file .env up -d
#
# 访问:
#   - 管理后台: http://localhost     (Console SPA + Admin API)
#   - Open API:  http://localhost:8080
#
# 日志查看:
#   docker logs -f contful-console
#   docker exec contful-console cat /app/logs/admin-api.log
#   docker exec contful-console cat /app/logs/access.log
#
# =============================================================================

services:
  # ---------------------------------------------------------------------------
  # Console 服务(Console SPA + Admin API,OpenResty 对外 :80 :443)
  # ---------------------------------------------------------------------------
  console:
    image: contful/console:pg-latest
    # 环境变量模式(推荐)
    environment:
      - DB_HOST=postgres
      - DB_PORT=5432
      - DB_NAME=contful
      - DB_USER=postgres
      - DB_PASSWORD=${DB_PASSWORD}
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_PASSWORD=${REDIS_PASSWORD}
      # 可选配置
      # - SECRET=ef3594a7274376527e4a31fc99341a27e372e7e7f3295c796684ef6a0149afea
      # - CONTFUL_MODE=api  # 仅启动 API,不启动 nginx
      # - LOG_LEVEL=debug
    # 配置文件模式(取消注释可覆盖环境变量)
    # volumes:
    #   - ../conf/console.yaml:/app/config.yml:ro
    volumes:
      - ./uploads:/app/uploads
      - ./logs:/app/logs
    healthcheck:
      test: ["CMD", "wget", "-q", "-O-", "http://localhost:9080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "9080:9080"

  # ---------------------------------------------------------------------------
  # Open API 服务(无状态,可水平扩展)
  # ---------------------------------------------------------------------------
  openapi:
    image: contful/openapi:pg-latest
    # 环境变量模式(推荐)
    environment:
      - DB_HOST=postgres
      - DB_PORT=5432
      - DB_NAME=contful
      - DB_USER=postgres
      - DB_PASSWORD=${DB_PASSWORD}
      - REDIS_HOST=redis
      - REDIS_PORT=6379
      - REDIS_PASSWORD=${REDIS_PASSWORD}
      # 可选配置
      # - SECRET=ef3594a7274376527e4a31fc99341a27e372e7e7f3295c796684ef6a0149afea
      # - CONTFUL_SERVER_PORT=8080
      # - LOG_LEVEL=debug
    # 配置文件模式(取消注释可覆盖环境变量)
    # volumes:
    #   - ../conf/openapi.yaml:/app/config.yml:ro
    volumes:
      - ./uploads:/app/uploads
      - ./logs:/app/logs
    healthcheck:
      test: ["CMD", "wget", "-q", "-O-", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s
    restart: unless-stopped
    ports:
      - "8080:8080"

Tag summary

Content type

Image

Digest

sha256:9dac155bb…

Size

76.2 MB

Last updated

5 months ago

docker pull contful/console:1.5.9-postgresql