mirror of
https://github.com/cooderl/wewe-rss.git
synced 2026-08-31 01:42:07 +08:00
chore: fix docker build
This commit is contained in:
+3
-1
@@ -48,4 +48,6 @@ ENV MAX_REQUEST_PER_MINUTE=60
|
||||
ENV AUTH_CODE=""
|
||||
ENV DATABASE_URL=""
|
||||
|
||||
CMD ["npm", "run", "start:migrate:prod"]
|
||||
RUN chmod +x ./docker-bootstrap.sh
|
||||
|
||||
CMD ["./docker-bootstrap.sh"]
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
#!/bin/sh
|
||||
# ENVIRONEMTN from docker-compose.yaml doesn't get through to subprocesses
|
||||
# Need to explicit pass DATABASE_URL here, otherwise migration doesn't work
|
||||
# Run migrations
|
||||
DATABASE_URL=${DATABASE_URL} npx prisma migrate deploy
|
||||
# start app
|
||||
DATABASE_URL=${DATABASE_URL} node dist/main
|
||||
@@ -5,6 +5,7 @@ datasource db {
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
binaryTargets = ["native", "linux-musl"] // 生成linux可执行文件
|
||||
}
|
||||
|
||||
// 读书账号
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ services:
|
||||
# 请修改为自己的密码
|
||||
MYSQL_ROOT_PASSWORD: 123456
|
||||
TZ: 'Asia/Shanghai'
|
||||
ports:
|
||||
- 3306:3306
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
|
||||
server:
|
||||
image: cooderl/wewe-rss-server:latest
|
||||
|
||||
Reference in New Issue
Block a user