Last active
March 20, 2023 09:39
-
-
Save CloudLinuxDeveloper/f2487d21ea95298cc22a133d119c1eb3 to your computer and use it in GitHub Desktop.
How to Install OpenEDX with Docker on Ubuntu Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EDXAPP_PREVIEW_LMS_BASE: preview-${deploy_host} | |
EDXAPP_LMS_BASE: ${deploy_host} | |
EDXAPP_CMS_BASE: studio-${deploy_host} | |
EDXAPP_SITE_NAME: ${deploy_host} | |
CERTS_DOWNLOAD_URL: "http://certs-${deploy_host}" | |
CERTS_VERIFY_URL: "http://certs-${deploy_host}" | |
EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT: "https://payments-${deploy_host}" | |
EDXAPP_ECOMMERCE_API_URL: "https://payments-${deploy_host}/api/v2" | |
ECOMMERCE_ECOMMERCE_URL_ROOT: "https://payments-${deploy_host}" | |
ECOMMERCE_LMS_URL_ROOT: "https://${deploy_host}" | |
ECOMMERCE_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true | |
COURSE_DISCOVERY_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2" | |
DISCOVERY_OAUTH_URL_ROOT: "https://${deploy_host}" | |
DISCOVERY_URL_ROOT: "https://discovery-${deploy_host}" | |
DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true | |
NGINX_ENABLE_SSL: True | |
NGINX_SSL_CERTIFICATE: '/directory/to/the/certificate' | |
NGINX_SSL_KEY: '/directory/to/the/key | |
NGINX_REDIRECT_TO_HTTPS: True | |
EDXAPP_LMS_SSL_NGINX_PORT: 443 | |
EDXAPP_CMS_SSL_NGINX_PORT: 443 | |
EDXAPP_LMS_NGINX_PORT: 80 | |
EDXAPP_CMS_NGINX_PORT: 80 | |
#Install Docker | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt install docker-ce | |
sudo systemctl status docker | |
#Executing the Docker Command Without Sudo | |
sudo usermod -aG docker ${USER} | |
su - ${USER} | |
id -nG | |
sudo usermod -aG docker arif | |
#Install Docker-Compose | |
curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
#Install OpenEDX | |
git clone https://github.com/openfun/openedx-docker.git | |
export REDIS_SERVICE=redis-sentinel | |
unset REDIS_SERVICE | |
cd openedx-docker | |
bin/activate | |
Select an available flavored release to activate: | |
[1] dogwood/3/bare (default) | |
[2] dogwood/3/fun | |
[3] hawthorn/1/bare | |
[4] hawthorn/1/oee | |
[5] master/bare | |
[6] eucalyptus/3/bare | |
[7] eucalyptus/3/wb | |
Your choice: 4 | |
# Copy/paste hawthorn/1/oee environment: | |
export EDX_RELEASE="hawthorn.1" | |
export FLAVOR="oee" | |
export EDX_RELEASE_REF="open-release/hawthorn.1" | |
export EDX_DEMO_RELEASE_REF="open-release/hawthorn.1" | |
# Or run the following command: | |
. bin/../releases/hawthorn/1/oee/activate | |
# Check your environment with: | |
make info | |
#Once your environment is set, start the full project by running: | |
make bootstrap | |
#You should now be able to view the web applications: | |
LMS served by nginx at: http://localhost:8073 | |
CMS served by nginx at: http://localhost:8083 | |
#Developer guide: If you intend to work on edx-platform or its configuration, you'll need to compile static files in local directories that are mounted as docker volumes in the target container: | |
make dev-assets | |
#Now you can start services development server via: | |
make dev | |
#You should be able to view the web applications: | |
LMS served by Django's development server at: http://localhost:8072 | |
CMS served by Django's development server at: http://localhost:8082 | |
#If got problem for Page not found in LMS. The try this: | |
Try changing the PREVIEW_LMS_BASE variable to the localhost of the lms.env.json file and restart the service, that should solve the problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment