fix(docker): pre-create+chown infrastructure dirs (lib software.ts mkdirs at load); api run mounts explicit release dirs
This commit is contained in:
@@ -126,6 +126,9 @@ run_containers() {
|
|||||||
-e "DATABASE_URL=$DATABASE_URL" \
|
-e "DATABASE_URL=$DATABASE_URL" \
|
||||||
-e "JWT_SECRET=$JWT_SECRET" \
|
-e "JWT_SECRET=$JWT_SECRET" \
|
||||||
-e "CORS_ORIGINS=$CORS_ORIGINS" \
|
-e "CORS_ORIGINS=$CORS_ORIGINS" \
|
||||||
|
-e "SOFTWARE_DIR=/app/infrastructure/software-releases" \
|
||||||
|
-e "AGENT_RELEASES_DIR=/app/infrastructure/agent-releases" \
|
||||||
|
-e "INSTALLER_DIR=/app/infrastructure/installer" \
|
||||||
fleetforge/api:latest
|
fleetforge/api:latest
|
||||||
|
|
||||||
log "starting worker"
|
log "starting worker"
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ COPY --from=builder /app/node_modules ./node_modules
|
|||||||
COPY --from=builder /app/apps/api/node_modules ./apps/api/node_modules
|
COPY --from=builder /app/apps/api/node_modules ./apps/api/node_modules
|
||||||
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
COPY --from=builder /app/apps/api/dist ./apps/api/dist
|
||||||
COPY --from=builder /app/apps/api/package.json ./apps/api/
|
COPY --from=builder /app/apps/api/package.json ./apps/api/
|
||||||
|
RUN mkdir -p /app/infrastructure/software-releases /app/infrastructure/agent-releases /app/infrastructure/installer \
|
||||||
|
&& chown -R fleetforge:fleetforge /app/infrastructure
|
||||||
USER fleetforge
|
USER fleetforge
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "apps/api/dist/index.js"]
|
CMD ["node", "apps/api/dist/index.js"]
|
||||||
|
|||||||
Reference in New Issue
Block a user