|
@@ -13,18 +13,11 @@ services:
|
|
|
- MONGODB_URI=mongodb://mongodb:27017/mydatabase
|
|
|
depends_on:
|
|
|
- mongodb
|
|
|
- - init-uploads
|
|
|
restart: unless-stopped # 添加自动重启策略
|
|
|
volumes:
|
|
|
- nextjs-uploads:/app/public/uploads # 添加这行来挂载 uploads volume
|
|
|
-
|
|
|
- init-uploads:
|
|
|
- image: alpine
|
|
|
- volumes:
|
|
|
- - nextjs-uploads:/uploads
|
|
|
- command: chown -R 1001:1001 /uploads
|
|
|
user: root
|
|
|
-
|
|
|
+
|
|
|
mongodb:
|
|
|
image: mongo
|
|
|
volumes:
|