forked from iamrony777/javinfo-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 1.14 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.8"
services:
api:
# build:
# context: .
# dockerfile: Dockerfile.build
# args:
# - CREATE_REDIS
# - PLATFORM
image: iamrony777/javinfo-api:server
container_name: javinfo-api
environment:
- "BASE_URL=http://127.0.0.1:${PORT}"
- "INACTIVITY_TIMEOUT=60"
- "HEALTHCHECK_PROVIDER=self"
- "REDIS_URL=redis://default:${API_PASS}@db"
env_file:
- .env
ports:
- "0.0.0.0:8000:${PORT}"
depends_on:
- db
networks:
- net
db:
image: redis
container_name: redis
entrypoint:
[
"redis-server",
"--databases",
"1",
"--rdbcompression",
"yes",
"--dbfilename",
"database-redis.rdb",
"--dir",
"/data",
"--requirepass",
"${API_PASS}",
"--appendonly",
"no",
"--save",
"60",
"1",
"--loglevel",
"notice",
"--timeout",
"60"
]
expose:
- 6379/tcp
networks:
- net
volumes:
- data:/data:rw
networks:
net:
name: redis_network
volumes:
data: