Skip to content

Commit

Permalink
feat: ubuntu upgrade in dockerfile (#84)
Browse files Browse the repository at this point in the history
* feat: ubuntu upgrade  in  dockerfile

* fix: set app id to 1000

* fix: remove uwsgi

* fix: remove empty lines

* fix: update  changelog
  • Loading branch information
hinakhadim authored Oct 23, 2024
1 parent 7618ec9 commit 1cc9c3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions changelog.d/20241018_185457_hina.khadim_upgrade_ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- 💥[Feature] Update Course Discovery Image to use Ubuntu 22.04 as base OS. (by @hinakhadim)
24 changes: 12 additions & 12 deletions tutordiscovery/templates/discovery/build/discovery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# syntax=docker/dockerfile:1.4
###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 AS minimal
FROM docker.io/ubuntu:22.04 AS minimal

ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y curl git-core gettext language-pack-en \
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
pkg-config libsqlite3-dev mime-support
pkg-config libsqlite3-dev media-types mailcap
ENV LC_ALL=en_US.UTF-8

ARG APP_USER_ID=1000
Expand Down Expand Up @@ -91,13 +91,13 @@ RUN mkdir course_discovery/media
# Run production server
ENV DJANGO_SETTINGS_MODULE=course_discovery.settings.tutor.production
EXPOSE 8000
CMD uwsgi \
--static-map /static=/openedx/discovery/course_discovery/assets \
--static-map /media=/openedx/discovery/course_discovery/media \
--http 0.0.0.0:8000 \
--thunder-lock \
--single-interpreter \
--enable-threads \
--processes=2 \
--buffer-size=8192 \
--wsgi-file course_discovery/wsgi.py
CMD ["uwsgi", \
"--static-map", "/static=/openedx/discovery/course_discovery/assets", \
"--static-map", "/media=/openedx/discovery/course_discovery/media", \
"--http", "0.0.0.0:8000", \
"--thunder-lock", \
"--single-interpreter", \
"--enable-threads", \
"--processes=2", \
"--buffer-size=8192", \
"--wsgi-file", "course_discovery/wsgi.py"]

0 comments on commit 1cc9c3f

Please sign in to comment.