mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 00:10:00 +00:00
config: change docker-compose.yml
All checks were successful
Laravel-Oracle-Deploy / redeploy (push) Successful in 14s
All checks were successful
Laravel-Oracle-Deploy / redeploy (push) Successful in 14s
This commit is contained in:
@@ -12,7 +12,7 @@ services:
|
|||||||
- APP_ENV=production
|
- APP_ENV=production
|
||||||
- APP_DEBUG=false
|
- APP_DEBUG=false
|
||||||
- DB_CONNECTION=pgsql
|
- DB_CONNECTION=pgsql
|
||||||
- DB_HOST=finance-laravel-backend-postgres # 🎯 關鍵:改用資料庫的服務名稱當作 Host!
|
- DB_HOST=1Panel-postgresql-PXlc # 🎯 關鍵:改用資料庫的服務名稱當作 Host!
|
||||||
- DB_PORT=5432
|
- DB_PORT=5432
|
||||||
- DB_DATABASE=myfinance
|
- DB_DATABASE=myfinance
|
||||||
- DB_USERNAME=myfinance_henry4682
|
- DB_USERNAME=myfinance_henry4682
|
||||||
@@ -23,20 +23,20 @@ services:
|
|||||||
- finance-postgres # 🎯 確保資料庫先開,後端才開
|
- finance-postgres # 🎯 確保資料庫先開,後端才開
|
||||||
|
|
||||||
# 🐬 2. 直接在這裡把消失的 PostgreSQL 生回來!
|
# 🐬 2. 直接在這裡把消失的 PostgreSQL 生回來!
|
||||||
finance-postgres:
|
# finance-postgres:
|
||||||
image: postgres:15-alpine # 使用穩定的 15-alpine 版本
|
# image: postgres:15-alpine # 使用穩定的 15-alpine 版本
|
||||||
container_name: finance-laravel-backend-postgres
|
# container_name: finance-laravel-backend-postgres
|
||||||
restart: always
|
# restart: always
|
||||||
ports:
|
# ports:
|
||||||
- "5433:5432" # 🎯 把 5432 暴露給實體主機,這樣你本機的 pgAdmin 就能連進來了!
|
# - "5433:5432" # 🎯 把 5432 暴露給實體主機,這樣你本機的 pgAdmin 就能連進來了!
|
||||||
environment:
|
# environment:
|
||||||
- POSTGRES_DB=myfinance
|
# - POSTGRES_DB=myfinance
|
||||||
- POSTGRES_USER=myfinance_henry4682
|
# - POSTGRES_USER=myfinance_henry4682
|
||||||
- POSTGRES_PASSWORD=DwmQ78PB
|
# - POSTGRES_PASSWORD=DwmQ78PB
|
||||||
volumes:
|
# volumes:
|
||||||
- finance_db_data:/var/lib/postgresql/data # 🎯 資料持久化,容器重啟資料也不會掉
|
# - finance_db_data:/var/lib/postgresql/data # 🎯 資料持久化,容器重啟資料也不會掉
|
||||||
networks:
|
# networks:
|
||||||
- 1panel-network
|
# - 1panel-network
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
1panel-network:
|
1panel-network:
|
||||||
@@ -44,4 +44,4 @@ networks:
|
|||||||
|
|
||||||
# 🎯 定義資料庫的儲存卷
|
# 🎯 定義資料庫的儲存卷
|
||||||
volumes:
|
volumes:
|
||||||
finance_db_data:
|
finance_db_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user