Skip to content

Commit

Permalink
chore: pkg-config added to Docker File (#118)
Browse files Browse the repository at this point in the history
* chore: `pkg-config` added to Docker File + PIP Reqs

This is to future proof the update of mysql client in future releases. See: edx/edx-arch-experiments#349

* fix: Docker Compose issues

* fix: Bringing all pip req.s in line with those used by the code in `2u/project-theseus`

* fix: make upgrade on Py3.8

This is a guess, but since im upgrading the requirements locally, and i rebuilt my venv... It swapped Python versions to 3.10 instead of 3.8 (the target of our other tooling)...

```
brew install [email protected]
python3.8 -m venv .venv
. .venv/bin/activate
make upgrade
```

This is based on PR #95
  • Loading branch information
grmartin authored and pshiu committed Dec 11, 2023
1 parent f54851d commit 8f1dbd9
Show file tree
Hide file tree
Showing 12 changed files with 226 additions and 208 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ RUN mkdir -p /edx/var/log
USER app

# Gunicorn 19 does not log to stdout or stderr by default. Once we are past gunicorn 19, the logging to STDOUT need not be specified.
CMD gunicorn --workers=2 --name commerce-coordinator -c /edx/app/commerce-coordinator/commerce_coordinator/docker_gunicorn_configuration.py --log-file - --max-requests=1000 commerce_coordinator.wsgi:application
CMD gunicorn --workers=2 --name commerce-coordinator -c /edx/app/commerce-coordinator/commerce_coordinator/docker_gunicorn_configuration.py --log-file - --max-requests=1000 commerce-coordinator.wsgi:application

# This line is after the requirements so that changes to the code will not
# bust the image cache
Expand Down
29 changes: 14 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,40 @@ version: "2.1"
services:
db:
image: edxops/mysql:5.7
container_name: commerce_coordinator.db
container_name: commerce-coordinator.db
environment:
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
networks:
- devstack_default
volumes:
- commerce_coordinator_mysql:/var/lib/mysql
- commerce-coordinator_mysql:/var/lib/mysql

memcache:
image: memcached:1.5.10-alpine
container_name: commerce_coordinator.memcache
container_name: commerce-coordinator.memcache

app:
image: edx/commerce_coordinator
container_name: commerce_coordinator.app
image: devstack # this should exist locally from previous devstack, we will build our Dockerfile
build: . # Build Dockerfile if we need to.
container_name: commerce-coordinator.app
volumes:
- .:/edx/app/commerce_coordinator/
command: bash -c 'while true; do python /edx/app/commerce_coordinator/manage.py runserver 0.0.0.0:8140; sleep 2; done'
depends_on:
- db
- .:/edx/app/commerce-coordinator/
command: bash -c 'while true; do python /edx/app/commerce-coordinator/manage.py runserver 0.0.0.0:8140; sleep 2; done'
environment:
DJANGO_SETTINGS_MODULE: commerce_coordinator.settings.devstack
ports:
- "8140:8140"
networks:
- devstack_default
- default # Just these containers.
stdin_open: true
tty: true
depends_on:
- "db"
networks:
- devstack_default # edX Dev Stack
- default # Just these containers

networks:
default:
devstack_default:
external: true

volumes:
commerce_coordinator_mysql:
commerce-coordinator_mysql:
34 changes: 19 additions & 15 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ billiard==4.1.0
# via celery
celery[redis]==5.3.4
# via -r requirements/base.in
certifi==2023.5.7
certifi==2023.7.22
# via requests
cffi==1.15.1
# via
# cryptography
# pynacl
charset-normalizer==3.1.0
charset-normalizer==3.2.0
# via requests
click==8.1.7
# via
Expand Down Expand Up @@ -70,15 +70,15 @@ django==4.2.5
# edx-drf-extensions
# openedx-filters
# social-auth-app-django
django-cors-headers==4.0.0
django-cors-headers==4.2.0
# via -r requirements/base.in
django-crum==0.7.9
# via edx-django-utils
django-extensions==3.2.1
django-extensions==3.2.3
# via -r requirements/base.in
django-rest-swagger==2.2.0
# via -r requirements/base.in
django-waffle==3.0.0
django-waffle==4.0.0
# via
# -r requirements/base.in
# edx-django-utils
Expand All @@ -95,7 +95,7 @@ edx-auth-backends==4.2.0
# via -r requirements/base.in
edx-django-release-util==1.3.0
# via -r requirements/base.in
edx-django-utils==5.5.0
edx-django-utils==5.7.0
# via
# -r requirements/base.in
# edx-drf-extensions
Expand All @@ -104,15 +104,15 @@ edx-drf-extensions==8.10.0
# via -r requirements/base.in
edx-opaque-keys==2.5.1
# via edx-drf-extensions
edx-rest-api-client==5.5.2
edx-rest-api-client==5.6.0
# via -r requirements/base.in
idna==3.4
# via requests
itypes==1.2.0
# via coreapi
jinja2==3.1.2
# via coreschema
kombu==5.3.0
kombu==5.3.2
# via celery
markupsafe==2.1.3
# via jinja2
Expand All @@ -126,17 +126,17 @@ oauthlib==3.2.2
# social-auth-core
openapi-codec==1.3.2
# via django-rest-swagger
openedx-filters==1.3.0
openedx-filters==1.6.0
# via -r requirements/base.in
pbr==5.11.1
# via stevedore
prompt-toolkit==3.0.38
prompt-toolkit==3.0.39
# via click-repl
psutil==5.9.5
# via edx-django-utils
pycparser==2.21
# via cffi
pyjwt[crypto]==2.7.0
pyjwt[crypto]==2.8.0
# via
# drf-jwt
# edx-auth-backends
Expand All @@ -151,13 +151,13 @@ python-dateutil==2.8.2
# via celery
python3-openid==3.2.0
# via social-auth-core
pytz==2023.3
pytz==2023.3.post1
# via
# -r requirements/base.in
# djangorestframework
pyyaml==6.0.1
# via edx-django-release-util
redis==4.5.5
redis==4.6.0
# via celery
requests==2.31.0
# via
Expand All @@ -181,7 +181,7 @@ six==1.16.0
# python-dateutil
slumber==0.7.1
# via edx-rest-api-client
social-auth-app-django==5.2.0
social-auth-app-django==5.3.0
# via edx-auth-backends
social-auth-core==4.4.2
# via
Expand All @@ -198,9 +198,13 @@ stripe==6.6.0
typing-extensions==4.8.0
# via
# asgiref
# edx-opaque-keys
# kombu
# stripe
tzdata==2023.3
# via backports-zoneinfo
# via
# backports-zoneinfo
# celery
uritemplate==4.1.1
# via coreapi
urllib3==2.0.5
Expand Down
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# make upgrade
#
distlib==0.3.6
distlib==0.3.7
# via virtualenv
filelock==3.12.4
# via
# tox
# virtualenv
packaging==23.1
# via tox
platformdirs==3.5.1
platformdirs==3.10.0
# via virtualenv
pluggy==1.3.0
# via tox
Expand Down
Loading

0 comments on commit 8f1dbd9

Please sign in to comment.