2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 12:10:25 +02:00

normalize naming schemes for docker images

This commit is contained in:
Frederik Ring 2019-10-10 10:00:02 +02:00
parent 916bcb3fd4
commit 37c55fdcf4
9 changed files with 11 additions and 11 deletions

View File

@ -28,12 +28,12 @@ jobs:
keys: keys:
- v1-{{ .Branch }} - v1-{{ .Branch }}
paths: paths:
- /caches/proxy.tar - /caches/website.tar
- run: - run:
name: Load Docker image layer cache name: Load Docker image layer cache
command: | command: |
set +o pipefail set +o pipefail
docker load -i /caches/proxy.tar | true docker load -i /caches/website.tar | true
- run: - run:
name: Build application Docker image name: Build application Docker image
command: | command: |
@ -46,16 +46,16 @@ jobs:
export DOCKER_IMAGE_TAG="latest" export DOCKER_IMAGE_TAG="latest"
export ROBOTS_FILE="robots.txt.staging" export ROBOTS_FILE="robots.txt.staging"
fi fi
docker build --build-arg siteurl=$SITEURL --build-arg robots=$ROBOTS_FILE -t offen/proxy:$DOCKER_IMAGE_TAG -f build/proxy/Dockerfile . docker build --build-arg siteurl=$SITEURL --build-arg robots=$ROBOTS_FILE -t offen/website:$DOCKER_IMAGE_TAG -f build/Dockerfile .
- run: - run:
name: Save Docker image layer cache name: Save Docker image layer cache
command: | command: |
mkdir -p /caches mkdir -p /caches
docker save -o /caches/proxy.tar offen/proxy docker save -o /caches/website.tar offen/website
- save_cache: - save_cache:
key: v1-{{ .Branch }}-{{ epoch }} key: v1-{{ .Branch }}-{{ epoch }}
paths: paths:
- /caches/proxy.tar - /caches/website.tar
- deploy: - deploy:
name: Push application Docker image name: Push application Docker image
command: | command: |

1
.gitignore vendored
View File

@ -18,7 +18,6 @@ __pycache__/
# Distribution / packaging # Distribution / packaging
.Python .Python
build/
develop-eggs/ develop-eggs/
dist/ dist/
downloads/ downloads/

View File

@ -11,7 +11,7 @@
"containerDefinitions": [ "containerDefinitions": [
{ {
"name": "proxy", "name": "proxy",
"image": "offen/proxy:stable", "image": "offen/website:stable",
"essential": true, "essential": true,
"memory": 128, "memory": 128,
"portMappings": [ "portMappings": [

View File

@ -4,7 +4,7 @@
"containerDefinitions": [ "containerDefinitions": [
{ {
"name": "proxy", "name": "proxy",
"image": "offen/proxy:latest", "image": "offen/website:latest",
"essential": true, "essential": true,
"memory": 128, "memory": 128,
"portMappings": [ "portMappings": [

View File

@ -35,10 +35,11 @@ update:
@echo "Applying pending database migrations ..." @echo "Applying pending database migrations ..."
@docker-compose run server migrate @docker-compose run server migrate
DOCKER_IMAGE_TAG ?= latest DOCKER_IMAGE_TAG ?= local
ROBOTS_FILE ?= robots.txt.staging ROBOTS_FILE ?= robots.txt.staging
SITEURL ?= http://localhost:8000
build: build:
@docker build --build-arg siteurl=${SITEURL} --build-arg robots=${ROBOTS_FILE} -t offen/proxy:${DOCKER_IMAGE_TAG} -f build/proxy/Dockerfile . @docker build --build-arg siteurl=${SITEURL} --build-arg robots=${ROBOTS_FILE} -t offen/website:${DOCKER_IMAGE_TAG} -f build/Dockerfile .
.PHONY: setup build bootstrap build secret .PHONY: setup build bootstrap build