mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
fix(deploy): remove example config and env setup from deployment
This commit is contained in:
@@ -21,8 +21,6 @@ RUN apk add --no-cache ca-certificates tzdata wget
|
||||
|
||||
COPY --from=builder /build/memoh-server /app/memoh-server
|
||||
|
||||
COPY config.toml.example /app/config.toml.example
|
||||
|
||||
RUN mkdir -p /var/lib/memoh/data
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ email = "admin@memoh.local"
|
||||
jwt_secret = "YZq8kXrW5dFpNt9mLxQvHbRjKsMnOePw"
|
||||
jwt_expires_in = "168h"
|
||||
|
||||
## Docker configuration (使用宿主机 Docker socket)
|
||||
## Docker configuration
|
||||
[containerd]
|
||||
socket_path = "unix:///var/run/docker.sock"
|
||||
namespace = "default"
|
||||
|
||||
@@ -29,20 +29,6 @@ fi
|
||||
echo -e "${GREEN}✓ Docker and Docker Compose are installed${NC}"
|
||||
echo ""
|
||||
|
||||
# Check .env file
|
||||
if [ ! -f .env ]; then
|
||||
echo -e "${YELLOW}⚠ .env file does not exist, creating...${NC}"
|
||||
cp .env.example .env
|
||||
|
||||
# Generate random JWT secret
|
||||
JWT_SECRET=$(openssl rand -base64 32 2>/dev/null || head -c 32 /dev/urandom | base64)
|
||||
sed -i.bak "s|JWT_SECRET=.*|JWT_SECRET=$JWT_SECRET|g" .env
|
||||
rm -f .env.bak
|
||||
|
||||
echo -e "${GREEN}✓ .env file created${NC}"
|
||||
echo -e "${YELLOW}⚠ Please edit .env file to change default passwords and configuration${NC}"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Check config.toml
|
||||
if [ ! -f config.toml ]; then
|
||||
|
||||
Reference in New Issue
Block a user