Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

fix .env.compose.example & run app from node user docker

Ahmed Essama7b9989bc2ee
diff --git a/.env.compose.example b/.env.compose.example
index c7a59781..21072434 100644
--- a/.env.compose.example
+++ b/.env.compose.example
@@ -12,9 +12,9 @@ DATABASE_NAME=smythos-local
DATABASE_URL="$DATABASE_PROVIDER://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST:3306/$DATABASE_NAME?allowPublicKeyRetrieval=true&useSSL=false"
APP_DOMAIN="localhost"
-APP_URL="http://$APP_DOMAIN" # Expansion of the APP_DOMAIN variable
+APP_URL="https://$APP_DOMAIN" # Expansion of the APP_DOMAIN variable
RUNTIME_DOMAIN="runtime.localhost"
-RUNTIME_URL="http://$RUNTIME_DOMAIN" # Expansion of the RUNTIME_DOMAIN variable
+RUNTIME_URL="https://$RUNTIME_DOMAIN" # Expansion of the RUNTIME_DOMAIN variable
DEFAULT_AGENT_DOMAIN="default.localhost"
PROD_AGENT_DOMAIN="prod.localhost"
diff --git a/Dockerfile b/Dockerfile
index 16730b6e..223cadfe 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -44,14 +44,20 @@ WORKDIR /app/packages/middleware
# RUN PRISMA_CLI_BINARY_TARGETS="linux-musl-openssl-3.0.x" pnpm run prisma:generate
RUN pnpm run prisma:generate
-RUN mkdir -p /root && mkdir -p /root/smythos-data && echo '{}' > /root/smythos-data/vault.json
-
+RUN mkdir -p /home/node/smythos-data && echo '{}' > /home/node/smythos-data/vault.json
COPY docker-entrypoint.sh /app/start.sh
RUN sed -i 's/\r$//' /app/start.sh && chmod +x /app/start.sh
+# Change ownership of app directory to node user (excluding node_modules for performance)
+RUN find /app -not -path "*/node_modules/*" -exec chown node:node {} + && \
+ chown -R node:node /home/node
+
# Expose app port + runtime port
EXPOSE 5050 5053
+# Switch to node user
+USER node
+
# Start the application
CMD ["/app/start.sh"]
diff --git a/docker-compose.yml b/docker-compose.yml
index f92254a0..b15f5268 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,5 +1,3 @@
-version: '3.8'
-
services:
# Traefik Reverse Proxy
traefik:
@@ -176,7 +174,7 @@ services:
- "traefik.http.middlewares.smythos.headers.ReferrerPolicy=strict-origin-when-cross-origin"
volumes:
- - smythos_data:/root/smythos-data
+ - smythos_data:/home/node/smythos-data
networks:
- smythos-network
depends_on: