feat: 对接 PostgreSQL 存储层
This commit is contained in:
@@ -19,10 +19,32 @@ services:
|
||||
container_name: camtalk-backend
|
||||
environment:
|
||||
- APP_ENV=production
|
||||
- CAMTALK_STORAGE_DRIVER=postgres
|
||||
- CAMTALK_STORAGE_DSN=postgres://camtalk:camtalk123@postgres:5432/camtalk?sslmode=disable
|
||||
- CAMTALK_AUTH_JWT_SECRET=78uWBBAF8XEQEotKDlrnlnd4y8i4WN3E4zXmNmC8BYQ=
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- camtalk-net
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
# 阿里云镜像,避免从 Docker Hub 拉取超时
|
||||
image: registry.cn-hangzhou.aliyuncs.com/library/postgres:15-alpine
|
||||
container_name: camtalk-postgres
|
||||
environment:
|
||||
POSTGRES_USER: camtalk
|
||||
POSTGRES_PASSWORD: camtalk123
|
||||
POSTGRES_DB: camtalk
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
networks:
|
||||
- camtalk-net
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
camtalk-net:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user