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 Sep 7, 2023
1 parent 52885ab commit 5fdb8be
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 328 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:
54 changes: 30 additions & 24 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ asgiref==3.7.2
async-timeout==4.0.3
# via redis
backports-zoneinfo[tzdata]==0.2.1
# via kombu
billiard==3.6.4.0
# via
# celery
# kombu
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 All @@ -43,15 +45,15 @@ coreapi==2.3.3
# openapi-codec
coreschema==0.0.4
# via coreapi
cryptography==41.0.1
cryptography==41.0.3
# via
# pyjwt
# social-auth-core
defusedxml==0.7.1
# via
# python3-openid
# social-auth-core
django==3.2.19
django==3.2.21
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
Expand All @@ -67,15 +69,15 @@ django==3.2.19
# 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 @@ -92,48 +94,48 @@ 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
# edx-rest-api-client
edx-drf-extensions==8.8.0
edx-drf-extensions==8.9.2
# via -r requirements/base.in
edx-opaque-keys==2.5.0
# 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
mysqlclient==2.2.0
# via -r requirements/base.in
newrelic==8.8.0
newrelic==9.0.0
# via edx-django-utils
oauthlib==3.2.2
# via
# requests-oauthlib
# 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 @@ -150,14 +152,14 @@ python-dateutil==2.8.2
# edx-drf-extensions
python3-openid==3.2.0
# via social-auth-core
pytz==2023.3
pytz==2023.3.post1
# via
# -r requirements/base.in
# django
# 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 @@ -182,7 +184,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 @@ -194,17 +196,21 @@ stevedore==5.1.0
# via
# edx-django-utils
# edx-opaque-keys
stripe==5.4.0
stripe==6.3.0
# via -r requirements/base.in
typing-extensions==4.6.3
typing-extensions==4.7.1
# 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.2
urllib3==2.0.4
# via requests
vine==5.0.0
# via
Expand Down
12 changes: 7 additions & 5 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.0
filelock==3.12.3
# 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 All @@ -27,7 +27,9 @@ tox==3.28.0
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/ci.in
# tox-battery
tox-battery==0.6.1
tox-battery==0.6.2
# via -r requirements/ci.in
virtualenv==20.23.0
typing-extensions==4.7.1
# via filelock
virtualenv==20.24.4
# via tox
Loading

0 comments on commit 5fdb8be

Please sign in to comment.