-
Notifications
You must be signed in to change notification settings - Fork 222
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
172 lines (151 loc) · 7.37 KB
/
docker-compose.yml
File metadata and controls
172 lines (151 loc) · 7.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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
# 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}
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'}
# # 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