1. 重新初始化

2. 调整为手动更新
3. 添加指定服务端口的环境变量
This commit is contained in:
ngfchl
2022-08-24 16:46:08 +08:00
parent ed40fac24b
commit e610400ab5
4 changed files with 10 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ ENV PYTHONUNBUFFERED 1
ENV DJANGO_SUPERUSER_USERNAME=admin
ENV DJANGO_SUPERUSER_EMAIL=admin@eamil.com
ENV DJANGO_SUPERUSER_PASSWORD=adminadmin
ENV DJANGO_WEB_PORT=8000
ENV DJANGO_DEBUG=True
COPY pip.conf /root/.pip/pip.conf

View File

View File

@@ -23,6 +23,13 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-6wrh^t$@gbb^s^=79@%cv=%yhq6gl^kane#g@-n-*n6+s1lo2f'
# SECURITY WARNING: don't run with debug turned on in production!
# if os.environ.get('DJANGO_DEBUG'):
# print("Debug is enabled.")
# DEBUG = True
# # When not specified, ALLOW_HOSTS defaults to:
# # ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]']
# else:
# DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['*']

View File

@@ -9,7 +9,7 @@ if [ ! -f ./db/db.sqlite3 ]; then
# 如果数据库存在,就不执行
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py loaddata db/pt.json
python manage.py loaddata pt.json
# mv db.sqlite3 ./db/db.sqlite3
fi
if [ ! -e $CONTAINER_ALREADY_STARTED ]; then