From 9b4c7cfeda956c3d2ab639b390bc6e418b3a11bd Mon Sep 17 00:00:00 2001 From: henry yo Date: Mon, 9 Mar 2026 00:49:08 +0800 Subject: [PATCH] first push add linebot & search invoices --- .gitignore | 16 ++++++++++++++++ docker-compose.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..593098d --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# 環境變數(絕對不能上傳) +.env + +# 虛擬環境 +.venv/ +venv/ + +# Python 快取 +__pycache__/ +*.pyc +*.pyo + +# Docker +# docker-compose.yml ← 改好後可以上傳,不用擋 + +# OS 檔案 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9293900 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.8' +services: + app: + build: ./app + ports: + - "8000:8000" + env_file: + - .env + depends_on: + - db + volumes: + - ./app:/app + - /app/.venv + + db: + image: postgres:15 + environment: + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_DB: ${POSTGRES_DB} + ports: + - "5432:5432" + volumes: + - pgdata:/var/lib/postgresql/data + +volumes: + pgdata: \ No newline at end of file