Commit Graph

10 Commits

Author SHA1 Message Date
Kyle McCormick
0b48f2795a build: Restore .dockerignore to improve image build and caching (#36877)
edx-platform's Dockerfile was removed in Jan 2025 because the
community was not maintaining or using it. The PR that removed it [1]
also removed the .dockerfile as an effort to clean up unnecessary
Docker-related files from the repo.

However, the .dockerignore file serves an important purpose for
*any* Docker image based on edx-platform: it identifies which files
and paths aren't relevant for the functioning of the image. For
example, Tutor greatly benefited from this file, because by ignoring
unnecessary files, the build context was shrunk and image cache
layers were less likely to be unnecesarily invalidated.

We restore the .dockerfile as it was previously in Sumac [2], with
the addition of /venv, /.venv, and __pycache__, and with the
removal of /Dockerfile (as it no longer exists).

[1] https://github.com/openedx/edx-platform/pull/35731
[2] https://github.com/openedx/edx-platform/blob/open-release/sumac.master/.dockerignore
2025-06-09 16:08:52 +00:00
Hunia Fatima
829f6dbf33 chore: remove dockerfile setup (#35731)
* chore: remove dockerfile setup
2025-01-16 17:46:57 +05:00
Kyle D. McCormick
1f41529a76 build: git-ignore static asset artifacts whether they are links or dirs
Remove the trailing slashes from the .gitignore entries for static asset
build artifacts. With these slashes, only directory contents are
ignored. Without these slashes, the artifact is ignored whether it is a
directory *or* an actual file (particularly, in our case: a symlink).

This allows us to build edx-platform static assets into a separate
directory, and then symlink to them from edx-platform.

Also: We remove the duplicate cms/static/css/ gitignore entry.
2024-06-04 11:48:58 -04:00
Feanil Patel
66e987997c Revert "Revert "chore: remove bok-choy settings"" 2023-11-01 13:41:37 -04:00
Robert Raposa
083ccbf09b Revert "chore: remove bok-choy settings" 2023-10-31 15:27:44 -04:00
salman2013
a763287152 chore: remove all reference for bok-choy 2023-09-28 16:05:15 +05:00
Kyle McCormick
db459761d8 build: don't exclude lms/static/css/vendor from Docker build (#33143)
The .dockerignore file smartly excludes lms/static/css from the Docker
build, as most of its contents are generated CSS.

However, there is one version-controlled subdirectory of lms/static/css:
lms/static/css/vendor.

In order to correctly build a Docker image using a bind-mounted
edx-platform repository, we need this vendor directory to be included.
2023-08-31 16:02:58 +00: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
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
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