Skip to content

Commit

Permalink
Add possibility to set tag in docker release script
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywink committed Mar 6, 2019
1 parent 987a86d commit b7d40ce
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ bower_components/
socialhome/static/mocha/
/docs/_build/
/yarn.lock
docker_release.sh
docker-compose.yml
package-lock.json
.env
.tox
.pytest_cache
/var/exports
1 change: 1 addition & 0 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ ENV DJANGO_DEBUG False
ENV DJANGO_ACCOUNT_ALLOW_REGISTRATION=False
ENV DJANGO_ALLOWED_HOSTS socialhome.local
ENV DBHOST=db
ENV SOCIALHOME_ACTIVITYPUB_ALPHA=False
ENV SOCIALHOME_RELAY_SCOPE=all

CMD circusd /app/config/circus.ini
19 changes: 17 additions & 2 deletions docker_release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
#!/usr/bin/env bash

#####################
# Release to Docker #
#####################
#
# Builds the image and pushes it to Docker Hub.
#
# Args: tag name, defaults to "latest"
#

set -e

if [[ -z "$1" ]]; then
tag=latest
else
tag=$1
fi

docker login

docker build -f docker/app/Dockerfile -t jaywink/socialhome .
docker push jaywink/socialhome:latest
docker build -f docker/app/Dockerfile -t jaywink/socialhome:${tag} .
docker push jaywink/socialhome:${tag}

0 comments on commit b7d40ce

Please sign in to comment.