-
Notifications
You must be signed in to change notification settings - Fork 206
/
Copy pathdocker-compose.yml
87 lines (84 loc) · 2.57 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
services:
mysql:
image: mariadb:10.6
container_name: jms_mysql
restart: always
environment:
TZ: ${TZ:-Asia/Shanghai}
MARIADB_ROOT_PASSWORD: ${DB_PASSWORD:-Np2qgqtiUayA857GpuVI0Wtg}
MARIADB_DATABASE: ${DB_NAME:-jumpserver}
healthcheck:
test: "mysql -h127.0.0.1 -uroot -p$$MARIADB_ROOT_PASSWORD -e 'SHOW DATABASES;'"
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
volumes:
- ${VOLUME_DIR:-./data}/mariadb/data:/var/lib/mysql
networks:
- net
redis:
image: redis:7.0
container_name: jms_redis
restart: always
command: redis-server --requirepass ${REDIS_PASSWORD:-KoJqlTDu1d5HwfXgJ4QTbZQt}
environment:
TZ: ${TZ:-Asia/Shanghai}
REDIS_PASSWORD: ${REDIS_PASSWORD:-KoJqlTDu1d5HwfXgJ4QTbZQt}
healthcheck:
test: "redis-cli -h 127.0.0.1 -a $$REDIS_PASSWORD info Replication"
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
volumes:
- ${VOLUME_DIR:-./data}/redis/data:/data
networks:
- net
jumpserver:
image: jumpserver/jms_all:${VERSION:-latest}
build:
context: .
dockerfile: Dockerfile
container_name: jms_all
privileged: true
restart: always
environment:
TZ: ${TZ:-Asia/Shanghai}
SECRET_KEY: ${SECRET_KEY:-vYneAbsXUhe4BghEeedNL7nfWLwaTTmhnwQMvjYOIG25Ofzghk}
BOOTSTRAP_TOKEN: ${BOOTSTRAP_TOKEN:-K1ffDfLSIK8SV2PZj6VaxOiv8KuawlJK}
LOG_LEVEL: ${LOG_LEVEL:-ERROR}
DB_HOST: ${DB_HOST:-mysql}
DB_PORT: ${DB_PORT:-3306}
DB_USER: ${DB_USER:-root}
DB_PASSWORD: ${DB_PASSWORD:-Np2qgqtiUayA857GpuVI0Wtg}
DB_NAME: ${DB_NAME:-jumpserver}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD:-KoJqlTDu1d5HwfXgJ4QTbZQt}
DOMAINS: ${DOMAINS:-}
ports:
- ${HTTP_PORT:-80}:80/tcp
- ${SSH_PORT:-2222}:2222/tcp
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: "curl -fsL http://localhost/api/health/ > /dev/null"
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
volumes:
- ${VOLUME_DIR:-./data}/core/data:/opt/jumpserver/data
- ${VOLUME_DIR:-./data}/koko/data:/opt/koko/data
- ${VOLUME_DIR:-./data}/lion/data:/opt/lion/data
- ${VOLUME_DIR:-./data}/chen/data:/opt/chen/data
- ${VOLUME_DIR:-./data}/web/data/logs:/var/log/nginx
- ${VOLUME_DIR:-./data}/web/data/download:/opt/download
networks:
- net
networks:
net: