-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 1.09 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
version: '2'
services:
database:
image: groonga/pgroonga:2.4.5-debian-13
volumes:
- ./db/init:/docker-entrypoint-initdb.d
- ./db/data:/var/lib/postgresql/data:Z
restart: unless-stopped
environment:
POSTGRES_DB: luoxu
POSTGRES_PASSWORD: PGroonga
POSTGRES_USER: PGroonga
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 10s
retries: 120
luoxu-frontend:
container_name: luoxu-frontend
build:
dockerfile: ./frontend.Dockerfile
args:
#后端的地址
BACKEND_URL: ${BACKEND_ADDR}:${FRONTEND_PORT}
ports:
- ${FRONTEND_PORT}:80
restart: unless-stopped
command: http-server -p 80 --proxy http://luoxu-backend:9008
links:
- "luoxu-backend"
luoxu-backend:
build:
dockerfile: ./backend.Dockerfile
container_name: luoxu-backend
restart: unless-stopped
volumes:
- ./telegram:/telegram
- ./config.toml:/app/config.toml
links:
- "database"