8000 for stash · FX-Max/docker-install-everything@e59fc80 · GitHub
[go: up one dir, main page]

Skip to content

Commit e59fc80

Browse files
committed
for stash
1 parent 1170975 commit e59fc80

File tree

7 files changed

+223
-0
lines changed

7 files changed

+223
-0
lines changed

jumpserver/.env.example

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 版本号可以自己根据项目的版本修改
2+
Version=v2.26.1
3+
4+
# 构建参数, 支持 amd64/arm64
5+
TARGETARCH=amd64
6+
7+
# Compose
8+
COMPOSE_PROJECT_NAME=jms
9+
COMPOSE_HTTP_TIMEOUT=3600
10+
DOCKER_CLIENT_TIMEOUT=3600
11+
DOCKER_SUBNET=172.16.238.0/24
12+
13+
# 持久化存储
14+
#VOLUME_DIR=/opt/jumpserver
15+
VOLUME_DIR=.
16+
17+
# MySQL
18+
DB_HOST=10.193.51.71
19+
DB_PORT=3306
20+
DB_USER=root
21+
DB_PASSWORD=123456
22+
DB_NAME=jumpserver
23+
24+
# Redis
25+
REDIS_HOST=10.193.51.71
26+
REDIS_PORT=6379
27+
REDIS_PASSWORD=
28+
29+
# Core
30+
SECRET_KEY=B3f2w8P2PfxIAS7s4URrD9YmSbtqX4vXdPUL217kL9XPUOWrmy
31+
BOOTSTRAP_TOKEN=7Q11Vz6R2J6BLAdO
32+
DEBUG=FALSE
33+
LOG_LEVEL=ERROR
34+
35+
##
36+
# SECRET_KEY 保护签名数据的密匙, 首次安装请一定要修改并牢记, 后续升级和迁移不可更改, 否则将导致加密的数据不可解密。
37+
# BOOTSTRAP_TOKEN 为组件认证使用的密钥, 仅组件注册时使用。组件指 koko、guacamole

jumpserver/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

jumpserver/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# example
2+
3+
## Usage
4+
5+
```bash
6+
cp .env.example .env # 如有
7+
docker-compose up -d xxx
8+
```
9+
10+
访问: [http://127.0.0.1:80](http://127.0.0.1:80)

jumpserver/conf/.gitignore

Whitespace-only changes.

jumpserver/data/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

jumpserver/docker-compose.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
version: '3'
2+
services:
3+
core:
4+
image: jumpserver/core:${Version}
5+
container_name: jms-core
6+
# restart: always
7+
tty: true
8+
command: start web
9+
environment:
10+
SECRET_KEY: $SECRET_KEY
11+
BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
12+
DEBUG: $DEBUG
13+
LOG_LEVEL: $LOG_LEVEL
14+
DB_HOST: $DB_HOST
15+
DB_PORT: $DB_PORT
16+
DB_USER: $DB_USER
17+
DB_PASSWORD: $DB_PASSWORD
18+
DB_NAME: $DB_NAME
19+
REDIS_HOST: $REDIS_HOST
20+
REDIS_PORT: $REDIS_PORT
21+
REDIS_PASSWORD: $REDIS_PASSWORD
22+
healthcheck:
23+
test: "curl -fsL http://localhost:8080/api/health/ > /dev/null"
24+
interval: 10s
25+
timeout: 5s
26+
retries: 3
27+
start_period: 90s
28+
volumes:
29+
- ${VOLUME_DIR}/data/core:/opt/jumpserver/data
30+
- ${VOLUME_DIR}/log/core:/opt/jumpserver/logs
31+
networks:
32+
- jms-net
33+
34+
celery:
35+
image: jumpserver/core:${Version}
36+
container_name: jms-celery
37+
# restart: always
38+
tty: true
39+
command: start task
40+
environment:
41+
SECRET_KEY: $SECRET_KEY
42+
BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
43+
DEBUG: $DEBUG
44+
LOG_LEVEL: $LOG_LEVEL
45+
DB_HOST: $DB_HOST
46+
DB_PORT: $DB_PORT
47+
DB_USER: $DB_USER
48+
DB_PASSWORD: $DB_PASSWORD
49+
DB_NAME: $DB_NAME
50+
REDIS_HOST: $REDIS_HOST
51+
REDIS_PORT: $REDIS_PORT
52+
REDIS_PASSWORD: $REDIS_PASSWORD
53+
depends_on:
54+
core:
55+
condition: service_healthy
56+
healthcheck:
57+
test: "bash /opt/jumpserver/utils/check_celery.sh"
58+
interval: 10s
59+
timeout: 5s
60+
retries: 3
61+
start_period: 30s
62+
volumes:
63+
- ${VOLUME_DIR}/data/core:/opt/jumpserver/data
64+
- ${VOLUME_DIR}/log/core:/opt/jumpserver/logs
65+
networks:
66+
- jms-net
67+
68+
koko:
69+
image: jumpserver/koko:${Version}
70+
container_name: jms-koko
71+
# restart: always
72+
privileged: true
73+
tty: true
74+
environment:
75+
CORE_HOST: http://core:8080
76+
BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
77+
LOG_LEVEL: $LOG_LEVEL
78+
depends_on:
79+
core:
80+
condition: service_healthy
81+
healthcheck:
82+
test: "curl -fsL http://localhost:5000/koko/health/ > /dev/null"
83+
interval: 10s
84+
timeout: 5s
85+
retries: 3
86+
start_period: 10s
87+
volumes:
88+
- ${VOLUME_DIR}/data/koko:/opt/koko/data
89+
ports:
90+
- 2222:2222
91+
networks:
92+
- jms-net
93+
94+
lion:
95+
image: jumpserver/lion:${Version}
96+
container_name: jms-lion
97+
# restart: always
98+
tty: true
99+
environment:
100+
CORE_HOST: http://core:8080
101+
BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
102+
LOG_LEVEL: $LOG_LEVEL
103+
depends_on:
104+
core:
105+
condition: service_healthy
106+
healthcheck:
107+
test: "curl -fsL http://localhost:8081/lion/health/ > /dev/null"
108+
interval: 10s
109+
timeout: 5s
110+
retries: 3
111+
start_period: 10s
112+
volumes:
113+
- ${VOLUME_DIR}/data/lion:/opt/lion/data
114+
networks:
115+
- jms-net
116+
117+
magnus:
118+
image: jumpserver/magnus:${Version}
119+
container_name: jms-magnus
120+
# restart: always
121+
tty: true
122+
environment:
123+
CORE_HOST: http://core:8080
124+
BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
125+
LOG_LEVEL: $LOG_LEVEL
126+
depends_on:
127+
core:
128+
condition: service_healthy
129+
healthcheck:
130+
test: "ps axu | grep -v 'grep' | grep magnus"
131+
interval: 10s
132+
timeout: 5s
133+
retries: 3
134+
start_period: 10s
135+
volumes:
136+
- ${VOLUME_DIR}/data/magnus:/opt/magnus/data
137+
ports:
138+
- 33060:33060
139+
- 33061:33061
140+
networks:
141+
- jms-net
142+
143+
web:
144+
image: jumpserver/web:${Version}
145+
container_name: jms-web
146+
# restart: always
147+
tty: true
148+
depends_on:
149+
core:
150+
condition: service_healthy
151+
healthcheck:
152+
test: "curl -fsL http://localhost/ > /dev/null"
153+
interval: 10s
154+
timeout: 5s
155+
retries: 3
156+
start_period: 10s
157+
volumes:
158+
- ${VOLUME_DIR}/data/core:/opt/jumpserver/data
159+
- ${VOLUME_DIR}/log/nginx:/var/log/nginx
160+
ports:
161+
- 80:80
162+
networks:
163+
- jms-net
164+
165+
networks:
166+
jms-net:
167+
driver: bridge
168+
ipam:
169+
driver: default
170+
config:
171+
- subnet: $DOCKER_SUBNET

jumpserver/log/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)
0