This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
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
3 changed files
with
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:2.7 | ||
|
||
RUN mkdir -p /app | ||
COPY . /app/tuxedo/tuxedo | ||
|
||
WORKDIR /app/tuxedo/tuxedo | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y -qq python-mysqldb && \ | ||
pip install -r requirements.txt && \ | ||
pip install gunicorn==19.6.0 && \ | ||
cp wsgi/tuxedo.wsgi wsgirunner.py | ||
|
||
EXPOSE 8000 | ||
|
||
ENV PYTHONPATH="/app/tuxedo:/app/tuxedo/tuxedo/vendor/lib/python:/app/tuxedo/tuxedo/vendor/src" | ||
|
||
CMD gunicorn -b 127.0.0.1:8000 -w 24 wsgirunner |
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,51 @@ | ||
# These environment variables must be set in CircleCI UI | ||
# | ||
# DOCKERHUB_REPO - docker hub repo, format: <username>/<repo> | ||
# DOCKER_EMAIL - login info for docker hub | ||
# DOCKER_USER | ||
# DOCKER_PASS | ||
# | ||
machine: | ||
services: | ||
- docker | ||
|
||
dependencies: | ||
override: | ||
- docker info | ||
|
||
# create a version.json | ||
- > | ||
printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' | ||
"$CIRCLE_SHA1" | ||
"$CIRCLE_TAG" | ||
"$CIRCLE_PROJECT_USERNAME" | ||
"$CIRCLE_PROJECT_REPONAME" | ||
"$CIRCLE_BUILD_URL" | ||
> version.json | ||
- docker build -t app:build . | ||
|
||
test: | ||
override: | ||
- 'true' | ||
|
||
# appropriately tag and push the container to dockerhub | ||
deployment: | ||
hub_latest: | ||
branch: "master" | ||
commands: | ||
- "[ ! -z $DOCKERHUB_REPO ]" | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- "docker tag app:build ${DOCKERHUB_REPO}:latest" | ||
- "docker push ${DOCKERHUB_REPO}:latest" | ||
|
||
hub_releases: | ||
# push all tags | ||
tag: /.*/ | ||
commands: | ||
- "[ ! -z $DOCKERHUB_REPO ]" | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | ||
- "echo ${DOCKERHUB_REPO}:${CIRCLE_TAG}" | ||
- "docker tag app:build ${DOCKERHUB_REPO}:${CIRCLE_TAG}" | ||
- "docker images" | ||
- "docker push ${DOCKERHUB_REPO}:${CIRCLE_TAG}" |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Django==1.2 | ||
MySQL-python==1.2.3c1 | ||
ipaddr==2.0.0 | ||
ipaddr==2.1.11 | ||
Markdown==2.0.3 | ||
South>=0.6.2 | ||
python-memcached==1.45 | ||
python-memcached==1.48 | ||
git+git://github.com/fwenzel/django-mozilla-product-details#egg=django-mozilla-product-details |