-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathdocker-compose.yml
112 lines (98 loc) · 4.33 KB
/
docker-compose.yml
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
version: "3"
services:
app:
image: codelit/courselit-app:latest
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
# This prevents the "Host must be trusted" error in next-auth
- AUTH_TRUST_HOST=true
# In production, replace the following with the connection string of a cloud
# hosted instance of MongoDB.
- DB_CONNECTION_STRING=mongodb://root:example@mongo
# 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'}
# 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.
# - MEDIALIT_APIKEY=${MEDIALIT_APIKEY}
# - MEDIALIT_SERVER=https://api.medialit.cloud
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'}
# - REDIS_HOST=redis
# expose:
# - "80"
# restart: on-failure
# depends_on:
# - redis
# redis:
# image: redis
# expose:
# - "6379"
# restart: on-failure