浏览代码

update docker to latest version

jeffrey 2 年之前
父节点
当前提交
1317b95a38
共有 5 个文件被更改,包括 14 次插入7 次删除
  1. 3 3
      README.md
  2. 2 0
      docker/Dockerfile
  3. 1 1
      docker/build.sh
  4. 6 1
      docker/docker-entrypoint.sh
  5. 2 2
      docker/run.sh

+ 3 - 3
README.md

@@ -38,10 +38,10 @@
 
 
 如何使用
 如何使用
 
 
-1. docker pull docker push zisokal/authbase:1.0
-2. docker run -d -p 5000:5000 \
+1. docker pull zisokal/authbase:1.1
+2. docker run -d -p 5000:5000 -p 80:80 \
 	-e DEV_DATABASE_URI=mysql+mysqlconnector://authbase:123456@127.0.0.1/authbase?charset=utf8 \
 	-e DEV_DATABASE_URI=mysql+mysqlconnector://authbase:123456@127.0.0.1/authbase?charset=utf8 \
-	--name authbase authbase:1.0
+	--name authbase zisokal/authbase:1.1
 3. 打开浏览器访问页面 http://localhost:5000。系统默认的登录名密码为admin/123456
 3. 打开浏览器访问页面 http://localhost:5000。系统默认的登录名密码为admin/123456
 
 
 
 

+ 2 - 0
docker/Dockerfile

@@ -9,7 +9,9 @@ ADD pip.conf /root/.pip/pip.conf
 ADD docker-entrypoint.sh /tmp/docker-entrypoint.sh
 ADD docker-entrypoint.sh /tmp/docker-entrypoint.sh
 
 
 RUN apt update && apt install -y git python3.8 python3-pip && \
 RUN apt update && apt install -y git python3.8 python3-pip && \
+    apt install -y nodejs && apt install -y npm && \
     cd /opt && git clone https://gitee.com/zhujf21st/authbase.git && cd authbase && \
     cd /opt && git clone https://gitee.com/zhujf21st/authbase.git && cd authbase && \
+    cd ui && npm install && cd .. && \
     pip3 install -r requirements.txt && \
     pip3 install -r requirements.txt && \
     mv /tmp/docker-entrypoint.sh /opt/authbase/docker-entrypoint.sh && chmod +x /opt/authbase/docker-entrypoint.sh &&  \
     mv /tmp/docker-entrypoint.sh /opt/authbase/docker-entrypoint.sh && chmod +x /opt/authbase/docker-entrypoint.sh &&  \
     apt install -yq mysql-server && \
     apt install -yq mysql-server && \

+ 1 - 1
docker/build.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 #!/bin/bash
 
 
-docker build -t authbase:1.0 .
+docker build -t zisokal/authbase:1.1 .

+ 6 - 1
docker/docker-entrypoint.sh

@@ -1,4 +1,9 @@
 #!/bin/bash
 #!/bin/bash
 service mysql start
 service mysql start
 
 
-python3 manager.py runserver --host 0.0.0.0
+cd ui
+npm run dev&
+cd ..
+
+#python3 manager.py runserver --host 0.0.0.0
+python3 -m flask --app start run -h 0.0.0.0

+ 2 - 2
docker/run.sh

@@ -1,4 +1,4 @@
 #!/bin/bash
 #!/bin/bash
-docker run -d -p 5000:5000 \
+docker run -d -p 5000:5000 -p 80:80 \
 	-e DEV_DATABASE_URI=mysql+mysqlconnector://authbase:123456@127.0.0.1/authbase?charset=utf8 \
 	-e DEV_DATABASE_URI=mysql+mysqlconnector://authbase:123456@127.0.0.1/authbase?charset=utf8 \
-	--name authbase authbase:1.0
+	--name authbase zisokal/authbase:1.1