capile/studio

Studio CMS:开源数据管理

1.2.4 2024-09-25 20:35 UTC

README

Studio是一个多用途数据管理工具,旨在作为API提供者、CMS或应用程序框架运行。主要目标是构建一个开源、易于使用的应用程序,用于构建Web应用程序或消费和分析数据。

准备好开始了吗?您需要

  • PHP版本8.3+
  • Composer
  • Git

如果您已经拥有它们,只需键入

git clone https://github.com/capile/studio.git studio
cd studio && composer install
./studio :start

Docker镜像

不同目的的Docker镜像可在 <data/deploy> 获取,兼容最新PHP/nodejs版本。

您可以直接使用它

docker run --rm -v studio-data:/opt/studio/data -p 9999:9999 tecnodesign/studio:latest

自定义配置

应用程序自定义应使用映射到 /opt/studio/config 文件夹的 *.yml 文件。例如,您可以通过添加配置 web-repos 来加载外部git内容存储库。

---
all:
  app:
    web-repos:
      - id: www
        src: https://github.com/capile/www.tecnodz.com.git
        mount: /
        mount-src: ~

然后运行

docker run --rm -v studio-config:/opt/studio/config -v studio-data:/opt/studio/data -p 9999:9999 tecnodesign/studio:latest

使用源代码运行Docker

如果您想与studio代码和存储库一起工作,可以挂载源存储库(请记住将权限修复为用户 www-data

git clone https://github.com/capile/studio.git studio
cd studio
docker run --rm -u $UID -e HOME=/tmp -v $PWD:/var/www/studio tecnodesign/studio:latest composer install --no-dev
find app.yml data/{cache,web*,config} -type f -uid $UID -print0 | xargs -0 chmod 666
find data/{cache,web*,config} -type d -uid $UID -print0 | xargs -0 chmod 777
docker run --rm -v studio-data:/opt/studio/data -v $PWD:/var/www/studio --name studio -p 9999:9999 tecnodesign/studio:latest studio-server

或使用docker-compose

git clone https://github.com/capile/studio.git studio
cd studio
docker-compose -f data/docker/docker-compose.yml up

使用本地源代码运行可能需要对容器用户的可写条件进行文件系统检查,因此您应该要么以 -u $UID 选项运行docker(可能引起一些错误),要么调整 data/ 文件夹的本地权限

find data/{cache,web*,config} -type f -uid $UID -print0 | xargs -0 chmod 666
find data/{cache,web*,config} -type d -uid $UID -print0 | xargs -0 chmod 777

现在通过 http://127.0.0.1:9999/_studio 访问演示Studio

镜像/服务器环境变量

|----------------------|---------------------------|--------------------------------------------------------------------------------------------------------------|