Commit 984739da authored by ibuler's avatar ibuler

[Docker] Add docker file

parent 0d48a80f
.git
logs/*
keys/*
...@@ -5,12 +5,12 @@ COPY . /opt/coco ...@@ -5,12 +5,12 @@ COPY . /opt/coco
WORKDIR /opt/coco WORKDIR /opt/coco
RUN cd requirements && yum -y install $(cat rpm_requirements.txt) && \ 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/logs
VOLUME /opt/coco/keys VOLUME /opt/coco/keys
RUN cp config_docker.py config.py RUN cp conf_docker.py conf.py
EXPOSE 2222 EXPOSE 2222
CMD python run_server.py CMD python run_server.py
\ No newline at end of file
...@@ -8,11 +8,14 @@ BASE_DIR = os.path.dirname(__file__) ...@@ -8,11 +8,14 @@ BASE_DIR = os.path.dirname(__file__)
class Config: class Config:
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复 """
APP_NAME = "coco" Coco config file
"""
# 默认的名字
# APP_NAME = "localhost"
# Jumpserver项目的url, api请求注册会使用 # 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 # 启动时绑定的ip, 默认 0.0.0.0
# BIND_HOST = '0.0.0.0' # BIND_HOST = '0.0.0.0'
...@@ -56,3 +59,10 @@ class Config: ...@@ -56,3 +59,10 @@ class Config:
# Admin的名字,出问题会提示给用户 # Admin的名字,出问题会提示给用户
# ADMINS = '' # ADMINS = ''
class ConfigDocker(Config):
pass
config = ConfigDocker()
\ No newline at end of file
...@@ -8,8 +8,11 @@ BASE_DIR = os.path.dirname(__file__) ...@@ -8,8 +8,11 @@ BASE_DIR = os.path.dirname(__file__)
class Config: class Config:
"""
Coco config file
"""
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复 # 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复
APP_NAME = "coco" # APP_NAME = "localhost"
# Jumpserver项目的url, api请求注册会使用 # 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://127.0.0.1:8080'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment