mirror of https://github.com/veops/cmdb.git
fix unicode encode error
This commit is contained in:
parent
f89169de96
commit
341a4359fa
|
@ -10,7 +10,7 @@ COPY . /data/apps/cmdb
|
||||||
|
|
||||||
WORKDIR /data/apps/cmdb
|
WORKDIR /data/apps/cmdb
|
||||||
|
|
||||||
RUN yum install -y epel-release \
|
RUN yum install -y epel-release && yum clean all\
|
||||||
&& yum install -y python-pip \
|
&& yum install -y python-pip \
|
||||||
&& pip install --no-cache-dir -r docs/requirements.txt
|
&& pip install --no-cache-dir -r docs/requirements.txt
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ type_map = {
|
||||||
'serialize': {
|
'serialize': {
|
||||||
Attribute.INT: int,
|
Attribute.INT: int,
|
||||||
Attribute.FLOAT: float,
|
Attribute.FLOAT: float,
|
||||||
Attribute.TEXT: str,
|
Attribute.TEXT: lambda x: x if isinstance(x, six.text_type) else str(x),
|
||||||
Attribute.TIME: str,
|
Attribute.TIME: lambda x: x if isinstance(x, six.text_type) else str(x),
|
||||||
Attribute.DATE: lambda x: x.strftime("%Y-%m-%d"),
|
Attribute.DATE: lambda x: x.strftime("%Y-%m-%d"),
|
||||||
Attribute.DATETIME: lambda x: x.strftime("%Y-%m-%d %H:%M:%S"),
|
Attribute.DATETIME: lambda x: x.strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,4 +3,3 @@
|
||||||
|
|
||||||
from .account import User
|
from .account import User
|
||||||
from .cmdb import *
|
from .cmdb import *
|
||||||
from .acl import *
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ services:
|
||||||
sed -i 's#{user}:{password}@127.0.0.1:3306/{db}#cmdb:123456@mysql:3306/cmdb#g' api/settings.py
|
sed -i 's#{user}:{password}@127.0.0.1:3306/{db}#cmdb:123456@mysql:3306/cmdb#g' api/settings.py
|
||||||
sed -i 's/127.0.0.1/redis/g' api/settings.py
|
sed -i 's/127.0.0.1/redis/g' api/settings.py
|
||||||
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
|
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
|
||||||
sleep 5
|
|
||||||
celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
|
celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
|
||||||
depends_on:
|
depends_on:
|
||||||
- cmdb-db
|
- cmdb-db
|
||||||
|
@ -87,7 +86,7 @@ services:
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
envsubst '$$CMDB_API_HOST $$CMDB_UI_HOST $$NGINX_PORT' < /etc/nginx/conf.d/nginx.cmdb.conf.example > /etc/nginx/conf.d/cmdb.conf
|
envsubst '$$CMDB_API_HOST $$CMDB_UI_HOST $$NGINX_PORT' < /etc/nginx/conf.d/nginx.cmdb.conf.example > /etc/nginx/conf.d/cmdb.conf
|
||||||
rm /etc/nginx/conf.d/default.conf
|
rm -f /etc/nginx/conf.d/default.conf
|
||||||
nginx -g 'daemon off;'
|
nginx -g 'daemon off;'
|
||||||
curl http://localhost/api/v0.1/ci/flush
|
curl http://localhost/api/v0.1/ci/flush
|
||||||
networks:
|
networks:
|
||||||
|
|
Loading…
Reference in New Issue