Commit Graph

43 Commits

Author SHA1 Message Date
Bilal Qamar
9f718613dd feat: updated node to v20 2024-12-05 11:20:57 -05:00
Usama Sadiq
f7b6fcb6b4 build: upgrade edxapp docker image to python 3.11 (#34982)
* build: upgrade edxapp docker image to python 3.11
---------

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2024-06-13 21:15:00 +05:00
Brian Smith
05baf4c1fe revert: revert: "chore: upgrade to node 18" (#34496)
This reverts commit eb26333ca6.
2024-04-19 14:03:42 -04:00
Feanil Patel
eb26333ca6 Revert "chore: upgrade to node 18" (#34496)
* Revert "chore: upgrade to node 18"

* Revert "fix: bump npm from 10.2.x to 10.5.x"

This reverts commit b6662d4ee0.

* Revert "fix: replace outdated webpack plugins"

This reverts commit b204f1b572.

* Revert "build: Remove the `npm bin` calls from package.json"

This reverts commit 4e3dd161ff.

* fix: fix bad conflict resolution.

---------

Co-authored-by: Diana Huang <dkh@edx.org>
2024-04-10 09:58:42 -04:00
Brian Smith
b6662d4ee0 fix: bump npm from 10.2.x to 10.5.x 2024-04-09 14:15:47 -04:00
Brian Smith
8fb63bb0cf chore(deps): update deps to support node 18 2024-04-09 10:32:54 -04:00
Brian Smith
2511556e95 chore: test updating node to 16.20 2024-04-09 10:32:54 -04:00
Shadi Naif
a6b180c6f3 feat: FC-0012 - add atlas pull behind a flag
(atlas pull) will be performed only if OPENEDX_ATLAS_PULL environment variable is set

Refs: FC-0012 OEP-58
2024-01-04 18:48:31 +03:00
alangsto
b9ee4a9ad2 test: remove echoes in dockerfile (#33639) 2023-11-01 10:11:02 -04:00
alangsto
eec67f4799 test: modify dockerfile to test environment variables (#33629) 2023-10-31 14:20:02 -04:00
Tim McCormack
67140624ed build: Install wget in development docker image (#33288)
It's needed by `make common_constraints.txt`. We're starting to see
failures running this command in lms-shell in devstack. This has probably
been going on the entire time, but the error suppression was only removed
recently in <https://github.com/openedx/edx-platform/pull/33271>.

The new RUN instruction for installing wget is added to the development
layer only, partly to limit image sizes and partly to make life harder for
any attacker who manages to gain code execution in production.

I've moved `USER app` from the end of the `base` layer to the start of the
`production` layer, since the only other layer (in this file) that builds
on `base` is `development`, which more or less immediately switches back
to root. (The intervening COPY instruction is not affected by the current
user.)

Ticket: https://github.com/openedx/edx-platform/issues/33287
2023-09-19 20:39:12 +00:00
Omar Al-Ithawi
3aa1fdd42b chore: remove duplicate apt dependencies from Dockerfile (#32982)
The following dependencies were duplicated in the same command:
 - libxml2-dev
 - libxmlsec1-dev
 - libxslt1-dev

This contribution is part of the [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) which is sparked by the [Translation Infrastructure update OEP-58](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0058-arch-translations-management.html#specification).
2023-09-11 12:43:00 -04:00
Muhammad Soban Javed
274aee2b9c fix: add few deps to base layer to fix reqs installation on dev image (#32985) 2023-08-21 17:49:46 +05:00
Kyle D. McCormick
fb5383a108 build: ensure that non-Tutor systems handle copy-node-modules.sh
Two fixes:

* In the (in-repo, non-Tutor) Dockerfile, add copy-node-modules.sh
  before `npm install`, since it is needed by the new postinstall hook.

* In paver/assets.py, run copy-node-modules.sh for backwards com-
  patibility, just for cases where `SKIP_NPM_INSTALL` is enabled
  (which would prevent our new postinstall hook from running
  automatically!). We will deprecate the paver asset commands all at
  once once the new non-paver stuff is 100% working.
2023-07-20 13:46:21 -04:00
Diana Huang
472104a1a6 fix: Add pkg-config to other package install block. (#32732)
We are still seeing issues running devstack provisioning
of LMS because it's missing pkg-config. We believe this might
be the location we need to add the package to.
2023-07-13 11:40:14 -04:00
Tim McCormack
437418d367 feat: Switch Dockerfile from npm install to npm ci; some cleanup (#32590)
Otherwise we're not really respecting the package-lock file and won't get
repeatable results.

Also:

- Clean up old error handling for npm<3. Were on npm 8 now. Probably
  can get rid of this.
- Use the shorthand `npm ci` rather than `npm clean-install` just for
  consistency with code elsewhere.
- Update comments in tests to be explicit about use of ci rather than
  install
2023-06-29 21:55:23 +00:00
Muhammad Soban Javed
8a5ecd68b8 fix: remove DJANGO_SETTINGS_MODULE env from Dockerfile (#32013)
* fix: remove DJANGO_SETTINGS_MODULE env from Dockerfile

This variable is being removed from development target of Dockerfile because, we are using `EDX_PLATFORM_SETTINGS` env variable for picking settings file to use with Django management commands. When
this env variable is set to `lms.envs.devstack_docker`, with dev image being used with devstack, it picks that settings for running tests too as it has higher precedence than the settings in ini
file. So removing this, so the test settings can be picked from ini file.

* fix: move apt dependencies in base layer

Previously, git and build-essentials were being installed in builder-production layer so these depenedencies were not available in the dev images that are being used as LMS and Studion devstack
images. So moving these dependencies to base layer so it is pre-installed in devstack images.
2023-04-04 16:06:34 +05:00
Saad Ali
d0fad59306 chore: Overhaul Dockerfile for sandboxes (#31232)
* chore: Overhaul Dockerfile for sandboxes using Docker best practices
* Reduce image size by installing and removing prerequisite packages
in the same layer.
* Rearrange stages to use docker-production settings for non-dev
  targets. docker-production settings already inherit production
  settings and can be used to override configuration specific to
  containers e.g. logging.

* chore: write improved Dockerfile2 just for testing

* chore: update development stage to not run as app user

* fix: wrap settings configuration in if statement

* chore: update Dockerfile.
* Moved code COPY command down in the base stage.
* Added comments.

Co-authored-by: Alie Langston <alangsto@wellesley.edu>
2022-12-06 08:42:13 -05:00
Saad Ali
62c13db64d chore: update Dockerifle to run apps as a low privileged user (#31179) 2022-10-25 16:12:54 -04:00
UsamaSadiq
897cb3617f refactor!: delete common/lib and related usages 2022-09-22 14:16:34 +05:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Mohammad Ahtasham ul Hassan
c6d113f26d chore: update Docker Image to use node 16 (#30444) 2022-05-23 15:18:53 +05:00
Mohammad Ahtasham ul Hassan
f801deaae5 Node Upgrade (#30420)
* feat: Node16 upgrade
2022-05-18 16:12:34 +05:00
Mohammad Ahtasham ul Hassan
fee54bf424 Revert "Node 16 Upgrade (#30354)" (#30399)
This reverts commit f4c3c3fb4d.
2022-05-16 18:42:42 -04:00
Mohammad Ahtasham ul Hassan
f4c3c3fb4d Node 16 Upgrade (#30354)
* feat: Node16 upgrade
2022-05-16 16:53:37 +05:00
Mohammad Ahtasham ul Hassan
e84187bacd Revert "feat: node16 upgrade (#30249)" (#30268)
This reverts commit f10ebf0752.
2022-04-18 21:57:17 +05:00
Mohammad Ahtasham ul Hassan
f10ebf0752 feat: node16 upgrade (#30249) 2022-04-18 16:32:53 +05:00
Chris Pappas
874997ea1d chore: iterate on we do dockerfile config override (#30204) 2022-04-07 16:08:48 -04:00
Chris Pappas
7c434524f7 temp: add runs to dockerfile to troubleshoot envvar (#30200) 2022-04-07 11:55:46 -04:00
Chris Pappas
be1ce46e33 fix: Do not hardcode LMS_CFG for lms-docker dockerfile target (#30191) 2022-04-06 15:57:34 -04:00
Chris Pappas
453ae1a3f3 fix: move redefinition of LMS_CFG under following dockerfile target (#30175) 2022-04-04 13:19:32 -04:00
Rebecca Graber
8a28a5f8d4 feat: move docker-based lms target to beginning (#30173) 2022-04-04 11:37:24 -04:00
Chris Pappas
e008357030 feat: add new target for docker-specific deployment of lms (#30168) 2022-04-04 08:53:26 -04:00
Kyle McCormick
29ed3d911a build: expose working openedx/lms and openedx/cms docker images (#29549)
This commits prepares edx-platform's experimental Dockerfile
for optional use in devstack. Presently, the image built by this
Dockerfile isn't used anywhere.

Notable changes:
* Drop the openedx/edx-platform image name in favor of
  openedx/lms and openedx/cms.
* Drop the newrelic stages and tags.
* Create openedx/lms-dev and openedx/cms-dev image
  variants which use Django devserver, install dev
  requirements, and specify devstack Django settings.
* Add config files at (lms,cms)/envs/devstack-experimental.yml,
  extracted from the existing edxapp docker image.
* Adds three new scripts, each of which replaces an Ansible
  or Paver-supported function with a pure bash + Django
  management command implementation.
2022-01-10 11:20:10 -05:00
Feanil Patel
16e4aa3c62 chore: Remove decentralized devstack config.
We have decided not to pursue the decentralized devstack design right
now and so we want to cleanup files and task that were built as a part
of the process.

Related Ticket: ARCHBOM-1685
2021-04-09 15:50:03 -04:00
Felipe Espinoza
6716d89e5d Merge PR #25343: Adding lynx to Dockerfile (#25343)
It is required by edx-platform/openedx/core/lib/html_to_text.py
2020-11-16 16:09:15 -08:00
Aarif
dafac0c9eb updated Dockerfile to use ubuntu 20.04 as base (#25435) 2020-11-03 17:28:03 +05:00
Aarif
77b9113727 Updated the Dockerfile to use python 3.8 (#25205) 2020-10-21 07:31:19 +05:00
Aarif
983d73c29f Revert "Updated the Dockerfile to switch to python 3.8" 2020-10-02 12:29:16 +05:00
Aarif
30acfdc904 Updated the Dockerfile to switch to python 3.8 2020-09-24 17:24:21 +05:00
Kyle McCormick
b24cb48eb0 Decentralized Devstack changes: Add and push Dockerfile; add decentralized devstack settings (#24666)
* Add and push Dockerfile; add decentralized devstack settings

Co-Authored-By: Diana Huang <dkh@edx.org>
Co-Authored-By: Kyle McCormick <kmccormick@edx.org>

* Remove Python requirements hack

Remove the attempted optimization to the installation of Python
package dependencies.  The dependencies in edx-platform change
about three times per day, so this was of dubious value.  And
because npm is run through nodeenv, which is a Python package,
the Python dependencies installation has to happen first.

* ARCHBOM-1439: Changing workdir to /edx/app/edxapp/edx-platform (#24835)

Context: The Dockerfile tries to stay in sych with legacy stuff.
In the ansible we configure the directory structure such that things
relating to the app but not in the codebase,
such as the env file wind up in /edx/app/edxapp/.
And the codebase winds up in /edx/app/edxapp/edx-platform.

I think due to accident, the dockerfile does
/edx/app/edx-platform/edx-platform instead of /edx/app/edxapp/edx-platform.

This commit tries to have Dockerfile more reflect what is currently happening in production

* Update ports for decentralized devstack ARCHBOM-1447 (#24841)

Switch from the LMS ports we've historically used for NGINX to those used for gunicorn, and fix the Studio ports to match the ones we've historically used for its gunicorn service. Also removed some leftover bits of the requirements hack.

Co-authored-by: Adam Blackwell <ablackwell@edx.org>
Co-authored-by: Diana Huang <dkh@edx.org>
Co-authored-by: jinder1s <msingh@edx.org>
Co-authored-by: Jeremy Bowman <jbowman@edx.org>
Co-authored-by: Manjinder Singh <49171515+jinder1s@users.noreply.github.com>
2020-09-03 11:47:08 -04:00
Troy Sankey
3b6b066c72 Cleanup unused CONFIG_ROOT variable and dead code.
From what I've gleaned, CONFIG_FILE (and LMS_CFG and STUDIO_CFG
environment variables) supercedes CONFIG_ROOT.  There's no code anymore
that reads the value of the CONFIG_ROOT django setting, and in turn the
CONFIG_ROOT environment variable.

Tangentially related to DENG-369
2020-08-20 16:30:33 -04:00
Cory Lee
148b90358f Add Dockerfile (#23088)
* Add Dockerfile.
* Add gunicorn config files for local development.
* Add .dockerignore file.

Co-authored-by: Joseph Mulloy <jmulloy@edx.org>
Co-authored-by: Fred Smith <derf@edx.org>
Co-authored-by: Adam Blackwell <ablackwell@edx.org>
Co-authored-by: Kyle McCormick <kmccormick@edx.org>
Co-authored-by: Nadeem Shahzad <nshahzad@edx.org>
2020-07-22 17:45:23 -04:00