-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
51 lines (46 loc) · 1.23 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 请先运行 `export NEKRO_DATA_DIR=${HOME}/srv/nekro_agent` 设定数据目录
# 然后运行 `sudo -E docker-compose up -d` 启动服务
version: "3"
services:
# PostgreSQL 服务
nekro_postgres:
image: postgres:14
container_name: nekro_postgres
environment:
POSTGRES_USER: nekro_agent
POSTGRES_PASSWORD: nekro_agent
POSTGRES_DB: nekro_agent
ports:
- "5432:5432"
volumes:
- nekro_postgres_data:/var/lib/postgresql/data
networks:
- nekro_network
restart: unless-stopped
# 主服务
nekro_agent:
image: kromiose/nekro-agent:latest
container_name: nekro_agent
environment:
- NEKRO_DATA_DIR=${NEKRO_DATA_DIR}
- NEKRO_POSTGRES_HOST=nekro_postgres
- NEKRO_POSTGRES_PORT=5432
- NEKRO_POSTGRES_USER=nekro_agent
- NEKRO_POSTGRES_PASSWORD=nekro_agent
- NEKRO_POSTGRES_DATABASE=nekro_agent
- NEKRO_RUN_IN_DOCKER=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${NEKRO_DATA_DIR}:${NEKRO_DATA_DIR}:rw
depends_on:
- nekro_postgres
ports:
- "8021:8021"
networks:
- nekro_network
restart: unless-stopped
volumes:
nekro_postgres_data:
networks:
nekro_network:
driver: bridge