Installization - nycu-xuan/FastShop GitHub Wiki
FastShop 使用 Docker 來設置專案。
Docker 安裝
-
Windows
- 你可以安裝 Docker-Desktop 來設置 Docker 環境,接著使用指令來安裝環境。
-
Linux
-
使用 apt-get 來安裝 Docker
sudo apt-get install Docker
-
-
Mac OS
- 你可以安裝 Docker-Desktop 來設置 Docker 環境,下載 Intel Chip (x86) 或者下載 Apple Chip (M1/M2)。
- 使用
docker.dmg
檔案點兩下即可完成安裝。
Project 環境安裝
使用指令來安裝。
docker compose up
執行
當 fastshop 安裝完成後,路徑會預設安裝在 /etc/fastshop
內。
此時你需要使用 Python 來運行 Flask 框架,需要運行的程式為 /etc/fastshop/backend/app.py
。
你可以鍵入以下的指令來開啟程式。
flask --app backend/app:create_app run --host 0.0.0.0 --port 8080
此時可以看到軟體出現訊息:
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8080
* Running on http://172.20.0.3:8080
Press CTRL+C to quit
* Restarting with stat
* Debugger is active!
* Debugger PIN: 118-432-465
使用 localhost:8080
即可連入網頁應用程式。