version: "3" services: app: image: codelit/courselit-app environment: - NODE_ENV=production # If you change the following port, do not forget to change the host port # listed under the PORTS block. - PORT=${PORT:-80} # This following string is used by the authentication framework to secure the JWT. # It is IMPORTANT that you set a random string as its value. # # You can use the following command to generate a secure random string. # openssl rand -base64 32 - AUTH_SECRET=som3_rand0m_String # In production, replace the following with the connection string of a cloud # hosted instance of MongoDB. - DB_CONNECTION_STRING=mongodb://root:example@mongo/courselit?authSource=admin # Disable DB transactions for standalone mongo in compose (opt-out) - DB_TRANSACTIONS=false # CourseLit uses Magic links to provide login functionality. Hence, it requires # access to the mail sending facility. # If you do not provide the following values, the mails will be dumped on to # the console and you will be on your own to make sense out of those mails. - EMAIL_USER=${EMAIL_USER} - EMAIL_PASS=${EMAIL_PASS} - EMAIL_HOST=${EMAIL_HOST} - EMAIL_FROM=${EMAIL_FROM} # CourseLit configures a super admin user when it boots up for the very first time # The email that you provide here will become the identifier for that super admin. - SUPER_ADMIN_EMAIL=${SUPER_ADMIN_EMAIL?'SUPER_ADMIN_EMAIL environment variable is not defined'} # SCORM cache directory. # Optionally, mount a volume to this directory to persist the cache. - CACHE_DIR=/tmp # For long running tasks like sending emails etc., the queue service can be # enabled. For using the queue service, uncomment the following line and the # queue block along with the redis block. # - QUEUE_SERVER=http://queue # File uploads # # CourseLit uses MediaLit (our another open-source software) to manage files on # a AWS S3 compatible storage. MediaLit is available as a hosted service # at https://medialit.cloud. You can self host it as well. # # Uncomment the following lines to use MediaLit as a hosted service. # The MEDIALIT_APIKEY can be obtained by signing up at https://medialit.cloud. # - MEDIALIT_APIKEY=${MEDIALIT_APIKEY} # - MEDIALIT_SERVER=https://api.medialit.cloud # # Uncomment the following lines to use MediaLit as a self hosted service. # The MEDIALIT_APIKEY can be obtained by running the medialit service locally and # checking the logs for the API key. # - MEDIALIT_APIKEY=${MEDIALIT_APIKEY} # - MEDIALIT_SERVER=http://medialit # # Google reCAPTCHA v3 is used to prevent abuse of the login functionality. # Uncomment the following lines to use reCAPTCHA. # - RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY} # - RECAPTCHA_SECRET_KEY=${RECAPTCHA_SECRET_KEY} # Reply by email (requires the queue service too). Set the same reply # domain in the app and queue services. Then configure exactly one # inbound provider as documented in apps/docs. # - INBOUND_EMAIL_DOMAIN=${INBOUND_EMAIL_DOMAIN} # - INBOUND_EMAIL_WEBHOOK_SECRET=${INBOUND_EMAIL_WEBHOOK_SECRET} # Postmark # - MAILGUN_WEBHOOK_SIGNING_KEY=${MAILGUN_WEBHOOK_SIGNING_KEY} # Mailgun # - INBOUND_EMAIL_SES_TOPIC_ARN=${INBOUND_EMAIL_SES_TOPIC_ARN} # Amazon SES # - INBOUND_EMAIL_SES_BUCKET=${INBOUND_EMAIL_SES_BUCKET} # - INBOUND_EMAIL_SES_REGION=${INBOUND_EMAIL_SES_REGION} # - INBOUND_EMAIL_SES_OBJECT_PREFIX=${INBOUND_EMAIL_SES_OBJECT_PREFIX} expose: - "${PORT:-80}" # Comment the following block if the proxy block is uncommented. ports: - "${PORT:-80}:${PORT:-80}" container_name: app restart: on-failure # This will be the database for CourseLit. While it is sufficient for the evaluation # purposes, we highly recommend using a cloud based database like MongoDB Atlas # for the production deployment. # mongo: image: mongo restart: always environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example # If you need to serve CourseLit on HTTPS, uncomment the following block to # enable the proxy server based on Caddy web server which comes with automatic # SSL. # # proxy: # image: codelit/courselit-proxy:latest # ports: # - "80:80" # - "443:443" # volumes: # - "./Caddyfile:/etc/caddy/Caddyfile" # depends_on: # - app # container_name: proxy # restart: on-failure # CourseLit can perform long running tasks like sending mails etc., in the # background. To perform tasks in the background, it can use the following # service. Uncomment the following block to enable queues. # # queue: # image: codelit/courselit-queue:latest # environment: # - NODE_ENV=production # - DB_CONNECTION_STRING=mongodb://root:example@mongo # # The following settings are required to actually send mails. # - EMAIL_USER=${EMAIL_USER?'EMAIL_USER environment variable is not defined'} # - EMAIL_PASS=${EMAIL_PASS?'EMAIL_PASS environment variable is not defined'} # - EMAIL_HOST=${EMAIL_HOST?'EMAIL_HOST environment variable is not defined'} # # Optional: enables reply tokens and Reply-To headers for conversation emails. # # The configured subdomain must be routed to a supported inbound provider. # - INBOUND_EMAIL_DOMAIN=${INBOUND_EMAIL_DOMAIN} # # The following secret is used by CourseLit app to sign jobs sent to the queue. # - COURSELIT_JWT_SECRET=${COURSELIT_JWT_SECRET?'COURSELIT_JWT_SECRET environment variable is not defined'} # - REDIS_HOST=redis # - DOMAIN=courselit.app # expose: # - "80" # restart: on-failure # depends_on: # - redis # redis: # image: redis # expose: # - "6379" # restart: on-failure # MediaLit is a hosted service for file storage. Uncomment the following block to # self host it. You will need a S3 compatible storage to use it. # Uncomment the following block to use MediaLit as a self-hosted service. # # medialit: # image: codelit/medialit # environment: # - EMAIL=${SUPER_ADMIN_EMAIL?'SUPER_ADMIN_EMAIL is required to set up a user on MediaLit'} # # In production, replace the following with the connection string of a cloud # # hosted instance of MongoDB. # - DB_CONNECTION_STRING=mongodb://root:example@mongo/medialit?authSource=admin # # AWS S3 compatible storage configuration # - CLOUD_ENDPOINT=${CLOUD_ENDPOINT?'CLOUD_ENDPOINT is required'} # - CLOUD_REGION=${CLOUD_REGION?'CLOUD_REGION is required'} # - CLOUD_KEY=${CLOUD_KEY?'CLOUD_KEY is required'} # - CLOUD_SECRET=${CLOUD_SECRET?'CLOUD_SECRET is required'} # - CLOUD_BUCKET_NAME=${CLOUD_BUCKET_NAME?'CLOUD_BUCKET_NAME is required'} # - CLOUD_PREFIX=${CLOUD_PREFIX?'CLOUD_PREFIX is required'} # - CDN_ENDPOINT=${CDN_ENDPOINT?'CDN_ENDPOINT is required'} # # Temporary file directory for uploads transformations # - TEMP_FILE_DIR_FOR_UPLOADS=/tmp # - ENABLE_TRUST_PROXY=${ENABLE_TRUST_PROXY} # # CloudFront configuration # - ACCESS_PRIVATE_BUCKET_VIA_CLOUDFRONT=${ACCESS_PRIVATE_BUCKET_VIA_CLOUDFRONT} # - CLOUDFRONT_KEY_PAIR_ID=${CLOUDFRONT_KEY_PAIR_ID} # - CLOUDFRONT_PRIVATE_KEY=${CLOUDFRONT_PRIVATE_KEY} # - CDN_MAX_AGE=${CDN_MAX_AGE} # # To make MediaLit work on local. This allows the medialit service # # to be accessed from the host machine. # - HOSTNAME_OVERRIDE=localhost:8000 # ports: # - "8000:80" # depends_on: # - mongo # restart: on-failure