Scaffold Cloudron packaging workspace and automation
This commit is contained in:
20
apps/nautilus-trader/CloudronManifest.json
Normal file
20
apps/nautilus-trader/CloudronManifest.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"manifestVersion": 2,
|
||||
"id": "com.knel.nautilus.trader",
|
||||
"title": "Nautilus Trader",
|
||||
"author": "Known Element Packaging Team",
|
||||
"tagline": "TODO: Short one-line pitch",
|
||||
"description": "TODO: Comprehensive description for the Cloudron App Store entry.",
|
||||
"changelog": "Initial scaffold",
|
||||
"website": "https://github.com/nautechsystems/nautilus_trader",
|
||||
"supportUrl": "https://projects.knownelement.com/issues/226",
|
||||
"sourceUrl": "https://github.com/nautechsystems/nautilus_trader.git",
|
||||
"version": "0.1.0",
|
||||
"tags": ["custom", "known-element"],
|
||||
"healthCheckPath": "/",
|
||||
"memoryLimit": 536870912,
|
||||
"httpPort": 3000,
|
||||
"addons": {
|
||||
"localstorage": {}
|
||||
}
|
||||
}
|
22
apps/nautilus-trader/Dockerfile
Normal file
22
apps/nautilus-trader/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM cloudron/base:5.0.0
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/nautechsystems/nautilus_trader.git"
|
||||
LABEL org.opencontainers.image.description="Cloudron package for Nautilus Trader"
|
||||
|
||||
ARG APP_VERSION
|
||||
ENV APP_VERSION=${APP_VERSION:-latest}
|
||||
|
||||
# Copy application source into image at build time
|
||||
# Replace this with a multi-stage build if upstream provides Docker images.
|
||||
COPY ./app /app/code
|
||||
|
||||
# Copy start script and make it executable
|
||||
COPY ./start.sh /app/pkg/start.sh
|
||||
RUN chmod +x /app/pkg/start.sh
|
||||
|
||||
# Cloudron expects all processes to run as cloudron user
|
||||
USER cloudron
|
||||
WORKDIR /app/code
|
||||
|
||||
CMD ["/app/pkg/start.sh"]
|
20
apps/nautilus-trader/README.md
Normal file
20
apps/nautilus-trader/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Nautilus Trader on Cloudron
|
||||
|
||||
- **Upstream repository**: https://github.com/nautechsystems/nautilus_trader.git
|
||||
- **Implementation issue**: https://projects.knownelement.com/issues/226
|
||||
- **Status**: Draft scaffolding generated on $(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
## Packaging Checklist
|
||||
|
||||
1. Review upstream deployment requirements and map them to Cloudron services (database, cache, object storage, workers).
|
||||
2. Update `Dockerfile` with the correct build steps and runtime dependencies.
|
||||
3. Implement `start.sh` to configure the app from Cloudron-provided environment variables and launch the primary process.
|
||||
4. Edit `CloudronManifest.json` with accurate metadata, permissions, ports, addons, and health checks.
|
||||
5. Add integration and smoke tests under `test/` to validate the package.
|
||||
6. Document manual configuration steps, migration requirements, and known gaps in this README.
|
||||
|
||||
## Notes
|
||||
|
||||
- Replace the placeholder long-running process in `start.sh`.
|
||||
- Populate the `app/` directory with the application build artefacts or git submodules.
|
||||
- Use the shared packaging container (`docker/packager`) to run `cloudron build` and `cloudron install` so the host remains clean.
|
0
apps/nautilus-trader/app/.gitkeep
Normal file
0
apps/nautilus-trader/app/.gitkeep
Normal file
9
apps/nautilus-trader/metadata.json
Normal file
9
apps/nautilus-trader/metadata.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"slug": "nautilus-trader",
|
||||
"title": "Nautilus Trader",
|
||||
"issue": "https://projects.knownelement.com/issues/226",
|
||||
"repo": "https://github.com/nautechsystems/nautilus_trader.git",
|
||||
"additionalRepos": [],
|
||||
"created": "2025-10-02T16:46:50Z",
|
||||
"notes": "TODO: capture packaging notes"
|
||||
}
|
8
apps/nautilus-trader/start.sh
Executable file
8
apps/nautilus-trader/start.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Cloudron injects configuration via environment variables and files under /run
|
||||
# Use this script to render config files and launch the upstream service.
|
||||
|
||||
# TODO: Replace the command below with the correct process supervisor.
|
||||
exec /bin/sh -c "echo 'Replace start.sh with application startup logic for Nautilus Trader' && sleep infinity"
|
16
apps/nautilus-trader/test/smoke.sh
Executable file
16
apps/nautilus-trader/test/smoke.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Basic container reachability check executed inside the packaging container.
|
||||
# Replace curl target with an endpoint exposed by the app once the package is functional.
|
||||
cloudron_app_url=${CLOUDRON_APP_ORIGIN:-"http://localhost"}
|
||||
|
||||
http_code=$(curl -s -o /tmp/smoke.log -w "%{http_code}" "${cloudron_app_url}")
|
||||
|
||||
if [[ "${http_code}" != "200" ]]; then
|
||||
echo "Unexpected HTTP status: ${http_code}" >&2
|
||||
cat /tmp/smoke.log >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Smoke test passed"
|
Reference in New Issue
Block a user