Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removed Dockerfile, updated docker configuration files #737

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/docker-compose-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ services:
- license_manager_mysql:/var/lib/mysql

app:
image: openedx/license-manager
build:
context: ..
dockerfile: Dockerfile
image: edxops/license-manager-dev
container_name: license-manager.app
volumes:
- ..:/edx/app/license_manager
Expand Down
130 changes: 0 additions & 130 deletions Dockerfile

This file was deleted.

41 changes: 0 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ pull_translations: ## pull translations from Transifex
push_translations: ## push source translation files (.po) from Transifex
tx push -s

open-devstack: ## open a shell on the server started by start-devstack
docker exec -it license-manager /edx/app/license_manager/devstack.sh open

pkg-devstack: ## build the license-manager image from the latest configuration and code
docker build -t license-manager:latest -f docker/build/license_manager/Dockerfile git://github.com/openedx/configuration

detect_changed_source_translations: ## check if translation files are up-to-date
cd license_manager && i18n_tool changed

Expand All @@ -167,16 +161,6 @@ dev.provision:
dev.up: dev.up.redis # Starts all of the services, will bring up the devstack-defined redis container if not running.
docker-compose up -d

dev.up.build:
docker-compose up -d --build

dev.up.build-no-cache:
docker-compose build --no-cache
docker-compose up -d

dev.up.redis:
docker-compose -f $(DEVSTACK_WORKSPACE)/devstack/docker-compose.yml up -d redis

dev.down: # Kills containers and all of their data that isn't in volumes
docker-compose down

Expand Down Expand Up @@ -221,28 +205,3 @@ dev.restore:

dev.static:
docker-compose exec -u 0 app python3 manage.py collectstatic --noinput

docker_build:
docker build . -f Dockerfile --target app -t openedx/license-manager
docker build . -f Dockerfile --target devstack -t openedx/license-manager:latest-devstack

docker build . -f Dockerfile --target app -t openedx/license-manager.worker
docker build . -f Dockerfile --target devstack -t openedx/license-manager.worker:latest-devstack

docker build . -f Dockerfile --target newrelic -t openedx/license-manager:latest-newrelic

docker_tag: docker_build
docker tag openedx/license-manager openedx/license-manager:$$GITHUB_SHA
docker tag openedx/license-manager:latest-devstack openedx/license-manager:$$GITHUB_SHA-devstack
docker tag openedx/license-manager:latest-newrelic openedx/license-manager:$$GITHUB_SHA-newrelic

docker_auth:
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin

docker_push: docker_tag docker_auth ## push to docker hub
docker push 'openedx/license-manager:latest'
docker push "openedx/license-manager:$$GITHUB_SHA"
docker push 'openedx/license-manager:latest-devstack'
docker push "openedx/license-manager:$$GITHUB_SHA-devstack"
docker push 'openedx/license-manager:latest-newrelic'
docker push "openedx/license-manager:$$GITHUB_SHA-newrelic"
15 changes: 3 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ services:
- license_manager_mysql8:/var/lib/mysql

app:
image: openedx/license-manager
build:
context: .
dockerfile: Dockerfile
image: edxops/license-manager-dev
container_name: license-manager.app
volumes:
- .:/edx/app/license_manager/
Expand Down Expand Up @@ -47,10 +44,7 @@ services:
container_name: license-manager.memcache

worker:
image: openedx/license-manager.worker
build:
context: .
dockerfile: Dockerfile
image: edxops/license-manager-dev.worker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the image was being pushed with both tags but now we only have one image so we can use the same image in all steps i.e. edxops/license-manager-dev.

command: bash -c 'cd /edx/app/license_manager/license_manager && celery -A license_manager worker -Q license_manager.default -l DEBUG'
container_name: license-manager.worker
depends_on:
Expand All @@ -76,10 +70,7 @@ services:
- ../src:/edx/src:cached

bulk_enrollment_worker:
image: openedx/license-manager.worker
build:
context: .
dockerfile: Dockerfile
image: edxops/license-manager-dev.worker
command: bash -c 'cd /edx/app/license_manager/license_manager && celery -A license_manager worker -Q license_manager.bulk_enrollment -l DEBUG'
container_name: license-manager.bulk_enrollment_worker
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion provision-license-manager.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name="license_manager"
port="18170"

docker-compose up -d --build
docker-compose up -d

# Install requirements
# Can be skipped right now because we're using the --build flag on docker-compose. This will need to be changed once we move to devstack.
Expand Down