Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
984739da
Commit
984739da
authored
Dec 25, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Docker] Add docker file
parent
0d48a80f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
6 deletions
+24
-6
.dockerignore
.dockerignore
+3
-0
Dockerfile
Dockerfile
+3
-2
conf_docker.py
conf_docker.py
+14
-3
conf_example.py
conf_example.py
+4
-1
run_server.py
run_server.py
+0
-0
No files found.
.dockerignore
0 → 100644
View file @
984739da
.git
logs/*
keys/*
Dockerfile
View file @
984739da
...
...
@@ -5,12 +5,12 @@ COPY . /opt/coco
WORKDIR
/opt/coco
RUN
cd
requirements
&&
yum
-y
install
$(
cat
rpm_requirements.txt
)
&&
\
pip
install
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip
install
-r
requirements.txt
VOLUME
/opt/coco/logs
VOLUME
/opt/coco/keys
RUN
cp
conf
ig_docker.py config
.py
RUN
cp
conf
_docker.py conf
.py
EXPOSE
2222
CMD
python run_server.py
\ No newline at end of file
conf_docker.py
View file @
984739da
...
...
@@ -8,11 +8,14 @@ BASE_DIR = os.path.dirname(__file__)
class
Config
:
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复
APP_NAME
=
"coco"
"""
Coco config file
"""
# 默认的名字
# APP_NAME = "localhost"
# Jumpserver项目的url, api请求注册会使用
CORE_HOST
=
os
.
environ
.
get
(
"CORE_HOST"
)
or
'http://
127.0.0.1
:8080'
CORE_HOST
=
os
.
environ
.
get
(
"CORE_HOST"
)
or
'http://
jumpserver
:8080'
# 启动时绑定的ip, 默认 0.0.0.0
# BIND_HOST = '0.0.0.0'
...
...
@@ -56,3 +59,10 @@ class Config:
# Admin的名字,出问题会提示给用户
# ADMINS = ''
class
ConfigDocker
(
Config
):
pass
config
=
ConfigDocker
()
\ No newline at end of file
conf_example.py
View file @
984739da
...
...
@@ -8,8 +8,11 @@ BASE_DIR = os.path.dirname(__file__)
class
Config
:
"""
Coco config file
"""
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复
APP_NAME
=
"coco
"
# APP_NAME = "localhost
"
# Jumpserver项目的url, api请求注册会使用
# CORE_HOST = os.environ.get("CORE_HOST") or 'http://127.0.0.1:8080'
...
...
manage
.py
→
run_server
.py
View file @
984739da
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment