🎉 初始化项目
This commit is contained in:
4
web-app/docker/build-lib.js
Normal file
4
web-app/docker/build-lib.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import getWebpackServeMiddleware from '../src/middleware/webpack-serve.js';
|
||||
|
||||
const middleware = getWebpackServeMiddleware();
|
||||
await middleware.runWebpackCompiler({ forceDist: true });
|
||||
17
web-app/docker/docker-compose.yml
Normal file
17
web-app/docker/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
sillytavern:
|
||||
build: ..
|
||||
container_name: sillytavern
|
||||
hostname: sillytavern
|
||||
image: ghcr.io/sillytavern/sillytavern:latest
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- FORCE_COLOR=1
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- "./config:/home/node/app/config"
|
||||
- "./data:/home/node/app/data"
|
||||
- "./plugins:/home/node/app/plugins"
|
||||
- "./extensions:/home/node/app/public/scripts/extensions/third-party"
|
||||
restart: unless-stopped
|
||||
12
web-app/docker/docker-entrypoint.sh
Normal file
12
web-app/docker/docker-entrypoint.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -e "config/config.yaml" ]; then
|
||||
echo "Resource not found, copying from defaults: config.yaml"
|
||||
cp -r "default/config.yaml" "config/config.yaml"
|
||||
fi
|
||||
|
||||
# Execute postinstall to auto-populate config.yaml with missing values
|
||||
npm run postinstall
|
||||
|
||||
# Start the server
|
||||
exec node server.js --listen "$@"
|
||||
Reference in New Issue
Block a user