Run API on Paas

This commit is contained in:
bandesz
2016-12-08 12:12:45 +00:00
parent d759842adc
commit fd66fbd719
29 changed files with 703 additions and 44 deletions

View File

@@ -13,10 +13,19 @@ RUN \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
make \
curl \
git \
build-essential \
zip \
libpq-dev \
jq \
&& echo "Install Cloud Foundry CLI" \
&& curl -sSL "https://cli.run.pivotal.io/stable?release=debian64&source=github" -o /tmp/cloudfoundry-cli.deb \
&& dpkg -i /tmp/cloudfoundry-cli.deb \
&& cf install-plugin -r CF-Community -f "autopilot" \
&& cf install-plugin -r CF-Community -f "blue-green-deploy" \
&& cf install-plugin -r CF-Community -f "antifreeze" \
&& echo "Clean up" \
&& rm -rf /var/lib/apt/lists/* /tmp/*

View File

@@ -1,17 +1,23 @@
.DEFAULT_GOAL := help
SHELL := /bin/bash
DOCKER_IMAGE_TAG := $(shell cat VERSION)
.PHONY: help
help:
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: build-build-image
build-build-image:
.PHONY: build
build:
docker build \
--pull \
--build-arg HTTP_PROXY="${HTTP_PROXY}" \
--build-arg HTTPS_PROXY="${HTTP_PROXY}" \
--build-arg NO_PROXY="${NO_PROXY}" \
-f Dockerfile-build \
-t govuk/notify-api-builder \
-t govuk/notify-api-builder:${DOCKER_IMAGE_TAG} \
.
.PHONY: bash
bash:
docker run -it --rm \
govuk/notify-api-builder \
bash

1
docker/VERSION Normal file
View File

@@ -0,0 +1 @@
2