28 lines
828 B
YAML
28 lines
828 B
YAML
# 视野后端单机部署:前后端一体单端口,./data(数据库)与 ./workspace(APK 上传)挂载持久化(容器重建不丢数据)
|
||
name: redfuture
|
||
|
||
networks:
|
||
redfuture-net:
|
||
driver: bridge
|
||
|
||
services:
|
||
observer-server:
|
||
build:
|
||
context: .
|
||
args:
|
||
GOPROXY: https://goproxy.cn,direct
|
||
container_name: observer-server
|
||
restart: unless-stopped
|
||
ports:
|
||
- "8080:8080"
|
||
volumes:
|
||
- /data:/app/data
|
||
- /workspace:/app/workspace
|
||
environment:
|
||
TZ: Asia/Shanghai
|
||
# 数据库 host 覆盖(同一份 config.yml:线上注入容器名连 postgres,本地不注入走默认值 127.0.0.1;
|
||
# 库名等其余项两边一致直接用配置默认值。机制见 common/config_env.go)
|
||
DB_HOST: postgres
|
||
networks:
|
||
- redfuture-net
|