-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
61 lines (59 loc) · 1.22 KB
/
docker-compose.yaml
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
52
53
54
55
56
57
58
59
60
61
version: "3.9"
services:
app:
image: gin-app/server
restart: always
container_name: je-app
networks:
- je_app
env_file:
- .env
volumes:
- "./config:/app/config"
- "./log:/app/log"
ports:
- "8888:8888"
command: ./server
depends_on:
- redis
- db
redis:
image: redis:7-alpine
container_name: je-redis
networks:
- je_app
restart: always
ports:
- "6379:6379"
command: [ "redis-server", "/etc/redis.conf", "--appendonly", "yes" ]
volumes:
- ./redis/data:/data
- ./redis/redis.conf:/etc/redis.conf
healthcheck:
test: "redis-cli -h 127.0.0.1 -p 6379 info Replication"
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
db:
image: postgis/postgis
container_name: je-db
restart: always
networks:
- je_app
healthcheck:
test: "exit 0"
ports:
- "54318:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=app
- TZ=Asia/Shanghai
- PGTZ=Asia/Shanghai
- ALLOW_IP_RANGE=0.0.0.0/0
volumes:
- "./data:/var/lib/postgresql/data"
networks:
je_app:
driver: bridge