2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 01:00:26 +01:00

inject offen account id at build time

This commit is contained in:
Frederik Ring 2020-01-08 15:53:08 +01:00
parent 35b3520f8d
commit 8cc74d9cf4
3 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,7 @@ jobs:
export BUCKET="offen-dev-staging" export BUCKET="offen-dev-staging"
export DISTRIBUTION="E13I20LK8ASYFH" export DISTRIBUTION="E13I20LK8ASYFH"
export ROBOTS_FILE="robots.txt.staging" export ROBOTS_FILE="robots.txt.staging"
export OFFEN_ACCOUNT_ID="8f7ee44a-4cd8-47f2-a77e-8c7c98d46b89"
fi fi
make build make build
aws s3 sync --delete ./output/. s3://$BUCKET aws s3 sync --delete ./output/. s3://$BUCKET

View File

@ -23,7 +23,7 @@ ROBOTS_FILE ?= robots.txt.staging
SITEURL ?= http://localhost:8000 SITEURL ?= http://localhost:8000
build: build:
@docker build --build-arg siteurl=${SITEURL} -t offen/website -f build/Dockerfile . @docker build --build-arg siteurl=${SITEURL} --build-arg offen-account-id=${OFFEN_ACCOUNT_ID} -t offen/website -f build/Dockerfile .
@rm -rf output && mkdir output @rm -rf output && mkdir output
@docker create --entrypoint=bash -it --name assets offen/website @docker create --entrypoint=bash -it --name assets offen/website
@docker cp assets:/code/homepage/output/. ./output/ @docker cp assets:/code/homepage/output/. ./output/

View File

@ -5,6 +5,8 @@ ENV NODE_PATH="/usr/lib/node_modules"
ARG siteurl ARG siteurl
ENV SITEURL=$siteurl ENV SITEURL=$siteurl
ARG offen-account-id
ENV OFFEN_ACCOUNT_ID=$offen-account-id
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0 RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0
RUN apt-get update \ RUN apt-get update \