Skip to content

About

Apollo Quick Start

Resources

Stars

728 stars

Watchers

29 watching

Forks

Repository files navigation

Download the named apollo-quick-start-<version>.zip asset from Quick Start Releases and extract it. The package includes the server and client JARs, SQL, startup script and Docker files. For local startup, install Java 17 or later and follow the database setup in the guide above. From the extracted directory, run ./demo.sh start or use docker compose up -d to start the packaged Compose configuration.

demo.sh starts the JAR with java -jar. Its configuration section contains the process and log defaults; override them with PID_FOLDER, LOG_FOLDER, LOG_FILENAME, LOG_APPENDERS, or STOP_WAIT_TIME environment variables. Use ./demo.sh start / ./demo.sh stop for background operation, or ./demo.sh run for foreground operation. The Docker image uses foreground operation so Java receives container stop signals. The Docker image defaults to LOG_APPENDERS=FILE,CONSOLE, so application logs appear in docker logs and /apollo-quick-start/apollo-service.log. The portalContext [...] isActive: true log indicates Portal startup has completed; visit http://localhost:8070. Override LOG_APPENDERS to change the log destinations.

JAVA_OPTS and RUN_ARGS retain the old launcher's whitespace-separated option format, for example JAVA_OPTS='-Xms128m -Xmx512m'. Quotes inside these variables are passed literally. Run background start and stop commands sequentially. On Linux/macOS, the recorded PID must match this Apollo JAR, and zombie processes count as stopped; Git Bash/Cygwin retains the old PID-existence check. Startup continues to poll the Portal endpoint for up to 120 seconds. STOP_WAIT_TIME is interpreted as decimal seconds, including values with leading zeros.

Background operation requires ps and curl. When started as root, Java runs as the JAR owner by default; set RUN_AS_USER to select another account. Background startup uses su; Linux foreground privilege dropping uses setpriv from util-linux (included in the Docker image) to preserve Java as PID 1. The runtime user needs write access to the configured log locations.

从 Quick Start Releases 下载名为 apollo-quick-start-<版本>.zip 的附件并解压。安装包包含服务端和客户端 JAR、SQL、启动脚本和 Docker 文件。本地启动需要 Java 17 或更高版本,按上方指南配置数据库后,在解压目录运行 ./demo.sh start。使用 Docker 可直接在解压目录运行 docker compose up -d。

demo.sh 使用 java -jar 启动 JAR。进程和日志默认值位于脚本的配置区,可通过 PID_FOLDER、LOG_FOLDER、LOG_FILENAME、LOG_APPENDERS 或 STOP_WAIT_TIME 环境变量覆盖。使用 ./demo.sh start / ./demo.sh stop 在后台启动和停止服务,或使用 ./demo.sh run 在前台运行。Docker 镜像采用前台运行方式,使 Java 能收到容器停止信号。Docker 镜像默认使用 LOG_APPENDERS=FILE,CONSOLE,应用日志同时输出到 docker logs 和 /apollo-quick-start/apollo-service.log。看到 portalContext [...] isActive: true 表示 Portal 已完成启动,可以访问 http://localhost:8070。可通过 LOG_APPENDERS 覆盖日志输出位置。

JAVA_OPTS 和 RUN_ARGS 延续旧启动器按空白分隔参数的格式,例如 JAVA_OPTS='-Xms128m -Xmx512m';变量内部的引号会按原样传递。后台 start 和 stop 命令应顺序执行。Linux/macOS 会确认记录的 PID 对应当前 Apollo JAR,并将僵尸进程视为已停止;Git Bash/Cygwin 延续旧版仅检查 PID 是否存在的方式。启动时继续等待 Portal HTTP 响应,最长 120 秒。STOP_WAIT_TIME 按十进制秒数解析,也支持带前导零的值。

后台运行需要 ps 和 curl。以 root 启动时,默认使用 JAR 所属用户运行 Java,可通过 RUN_AS_USER 指定其他用户。后台启动使用 su;Linux 前台运行时切换用户使用 util-linux 提供的 setpriv(Docker 镜像已包含),使 Java 仍然是 PID 1。运行用户需要对配置的日志位置具有写权限。

About

Apollo Quick Start

Resources

Stars

728 stars

Watchers

29 watching

Forks

Releases

Packages

Used by

Contributors

Languages