Skip to content

Commit fe0cbf8

Browse files
committed
Merge branch 'master' of https://gitee.com/bukun/TorCMS
2 parents fe44c98 + 1afba39 commit fe0cbf8

File tree

5 files changed

+23
-35
lines changed

5 files changed

+23
-35
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ gh-pages
106106
tags
107107

108108
# for Django
109-
# migrations/
109+
migrations/
110110
????_initial.py
111111
!admin_torcms/migrations/__init__.py
112112

docker/Debian/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ RUN echo "deb http://mirrors.163.com/debian/ bullseye-backports main non-free co
1919
#########################################
2020
RUN mkdir ~/.pip
2121
RUN echo "[global]" > ~/.pip/pip.conf
22+
<<<<<<< HEAD
2223
RUN echo "index-url = http://mirrors.aliyun.com/pypi/simple" >> ~/.pip/pip.conf
24+
=======
25+
RUN echo "index-url = http://mirrors.aliyun.com/pypi/simple" >> ~/.pip/pip.conf
26+
>>>>>>> 1afba395425ac7508be0075f826dba2e10cca879
2327
RUN echo "[install]" >> ~/.pip/pip.conf
2428
RUN echo "trusted-host=mirrors.aliyun.com" >> ~/.pip/pip.conf
2529
##############################################################################
@@ -56,10 +60,18 @@ RUN source /vpy/bin/activate && pip3 install wheel
5660
RUN source /vpy/bin/activate && pip3 install email_validator
5761
RUN source /vpy/bin/activate && pip3 install -r doc/requirements.txt
5862
RUN source /vpy/bin/activate && pip3 install -r doc/requirements-dev.txt
63+
RUN source /vpy/bin/activate && pip3 install django
64+
65+
RUN apt install -y sudo postgresql postgresql-contrib redis-server
66+
67+
RUN /etc/init.d/postgresql start
68+
69+
5970

6071
# 创建新用户
6172
RUN sudo -u postgres psql -c "CREATE ROLE torcms WITH LOGIN PASSWORD '123456';"
6273

74+
6375
# 创建新数据库并指定所有者
6476
RUN sudo -u postgres psql -c "CREATE DATABASE torcms WITH OWNER torcms;"
6577

docker/Debian/builit.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
# docker stop $(docker ps -a -q)
22
# docker rm $(docker ps -a -q)
3-
docker build -t bk-torcms-debian11 .
3+
4+
5+
podman build -t bk-torcms-debian11 .
6+
7+
8+
podman run -it bk-torcms-debian11 bash -c "/etc/init.d/postgresql start && sudo -u postgres psql -c \"CREATE ROLE torcms WITH LOGIN PASSWORD '111111';\" && sudo -u postgres psql -c \"CREATE DATABASE torcms WITH OWNER torcms;\" && /vpy/bin/python manage.py makemigrations && /vpy/bin/python manage.py migrate && /vpy/bin/python3 helper.py -i init "
9+
10+
# && /vpy/bin/python3 -m pytest torcms/tests/tester

docker/Debian/cfg_foo.py

-31
This file was deleted.

torcms/script/script_init.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def run_init(*args):
3737

3838
# run_init_tables()
3939

40-
if Path(XLSX_FILE).exists():
41-
run_gen_role_permission()
40+
# if Path(XLSX_FILE).exists():
41+
# run_gen_role_permission()
4242

4343
run_gen_category()
4444
run_create_admin()

0 commit comments

Comments
 (0)