### Serve the Application (npm) Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Installs dependencies and starts the development server using npm. The server automatically restarts on file changes. ```bash npm install npm run start:dev ``` -------------------------------- ### Development Environment Setup Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Steps to set up the development environment for Canvas RCE API, including copying configuration files. ```bash # Copy environment file cp .env.example .env # Copy Docker override file for development cp docker-compose.override.yml.dev docker-compose.override.yml # Optional: For Traefik integration # cp ./inst-cli/docker-compose/docker-compose.local.dev.yml docker-compose.local.dev.yml # Update .env with COMPOSE_FILE=docker-compose.local.dev.yml ``` -------------------------------- ### Node.js Production Setup Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Instructions for running the Canvas RCE API in a production Node.js environment, including installing dependencies and managing processes. ```javascript // Install production dependencies npm install --production // Start the application npm start // or node app.js // For multi-core utilization, consider process managers like Passenger or PM2. ``` -------------------------------- ### Docker Run Example Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md An example command to run the Canvas RCE API Docker container, specifying necessary environment variables for authentication and external service integration. ```bash docker run \ -e ECOSYSTEM_KEY \ -e ECOSYSTEM_SECRET \ -e FLICKR_API_KEY \ -e YOUTUBE_API_KEY \ -e STATSD_PORT=8125 \ -e STATSD_HOST=127.0.0.1 \ instructure/canvas-rce-api ``` -------------------------------- ### Testing with Mocha Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Runs all project tests using yarn. Provides an example for running a single test file. ```bash yarn test yarn test:one test/service/api/folders.test.js ``` -------------------------------- ### Canvas Security Secrets in vault_contents.yml Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Example of how to configure Canvas security secrets, including encryption and signing secrets, in a `vault_contents.yml` file. ```yaml development: "app-canvas/data/secrets": data: canvas_security: encryption_secret: "astringthatisactually32byteslong" signing_secret: "astringthatisactually32byteslong" ``` -------------------------------- ### Serve the Application (Docker) Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Builds and runs the application using Docker Compose. Requires configuring the app-host to 'rce.docker'. ```bash docker-compose build docker-compose up ``` -------------------------------- ### Canvas RCE API Configuration in dynamic_settings.yml Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Configuration snippet for setting the Canvas RCE API host within a `dynamic_settings.yml` file for local development. ```yaml development: config: canvas: rich-content-service: app-host: "canvas-rce-api-host" ``` -------------------------------- ### Releasing with Git Tags Source: https://github.com/instructure/canvas-rce-api/blob/master/README.md Tags a commit for release using semantic versioning (e.g., 'v1.2.3'). Pushing tags triggers Jenkins jobs for Docker image publishing. ```bash git tag "v1.2.3" git push --tags origin ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.