-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y python3.8 python3-pip && \ | ||
pip install pipenv | ||
|
||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 | ||
|
||
COPY . /app | ||
|
||
WORKDIR /app | ||
|
||
RUN pipenv install --deploy --ignore-pipfile | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["pipenv", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
IMAGE_NAME=shopify_django_app | ||
|
||
build: | ||
docker build -t $(IMAGE_NAME) . | ||
|
||
run: | ||
docker run -d --name $(IMAGE_NAME) -v $(PWD):/app -p 8000:8000 $(IMAGE_NAME) | ||
|
||
stop: | ||
docker stop $(IMAGE_NAME) | ||
docker rm $(IMAGE_NAME) | ||
|
||
shell: | ||
docker run -it $(IMAGE_NAME) /bin/bash | ||
|
||
migration: | ||
docker run -it -v $(PWD):/app $(IMAGE_NAME) pipenv run python manage.py migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters