diff --git a/.env.acceptance b/.env.acceptance
index 3a373f2a9..ac5f8a2f7 100644
--- a/.env.acceptance
+++ b/.env.acceptance
@@ -1,17 +1,18 @@
REACT_APP_ENVIRONMENT=acceptance
-REACT_APP_API_HOST=https://acc.api.wonen.zaken.amsterdam.nl/
-REACT_APP_AUTH_URL="https://auth.grip-on-it.com/v2/rjsfm52t/oidc/idp/authorize?response_type=code&scope=openid&client_id=d3d664c7-bb33-4bf0-b7c9-b8bdf1199b76&redirect_uri=https%3A%2F%2Facc.wonen.zaken.amsterdam.nl%2Fauthentication%2Fcallback"
+REACT_APP_API_HOST=https://api.wonen.zaken.woon-a.azure.amsterdam.nl/
# AZA
-REACT_APP_AZA_FE=https://acc.wonen.zaken.amsterdam.nl/
+REACT_APP_AZA_FE=https://wonen.zaken.woon-a.azure.amsterdam.nl/
# TON
-REACT_APP_API_HOST_TON=https://acc.api.ton.amsterdam.nl/
-REACT_APP_HOST_TON=https://acc.ton.amsterdam.nl/
+REACT_APP_API_HOST_TON=https://api.ton.woon-a.azure.amsterdam.nl/
+REACT_APP_HOST_TON=https://ton.woon-a.azure.amsterdam.nl/
# Keycloak
+REACT_APP_AUTH_URL=https://acc.iam.amsterdam.nl/auth/
REACT_APP_KEYCLOAK_REALM=datapunt-ad-acc
+REACT_APP_KEYCLOAK_CLIENT_ID=wonen-zaaksysteem-frontend
# Sentry
REACT_APP_SENTRY_PROJECT_NAME=zaken-frontend
diff --git a/.env.development b/.env.development
index 24c24891b..e801499d8 100644
--- a/.env.development
+++ b/.env.development
@@ -8,8 +8,13 @@
REACT_APP_API_HOST=http://localhost:8080/
REACT_APP_API_PATH=api/v1/
+# Keycloak
+REACT_APP_AUTH_URL=https://acc.iam.amsterdam.nl/auth/ # wonen-zaaksysteem-frontend client only exist for iam.amsterdam (prod)
+REACT_APP_KEYCLOAK_CLIENT_ID=wonen-zaaksysteem-frontend
+REACT_APP_KEYCLOAK_REALM=datapunt-ad-acc
+
# AZA
-REACT_APP_AZA_FE=https://acc.wonen.zaken.amsterdam.nl/
+REACT_APP_AZA_FE=http://localhost:2999/
# TON
REACT_APP_API_HOST_TON=https://acc.api.ton.amsterdam.nl/
diff --git a/.env.production b/.env.production
index 79910d78a..3388d4a30 100644
--- a/.env.production
+++ b/.env.production
@@ -7,7 +7,8 @@ REACT_APP_ENVIRONMENT=production
REACT_APP_API_HOST=https://api.wonen.zaken.amsterdam.nl/
REACT_APP_API_PATH=api/v1/
-REACT_APP_AUTH_URL="https://auth.grip-on-it.com/v2/rjsfm52t/oidc/idp/authorize?response_type=code&scope=openid&client_id=65ba2077-9c90-4fcd-be2a-f7549e783bdc&redirect_uri=https%3A%2F%2Fwonen.zaken.amsterdam.nl%2Fauthentication%2Fcallback"
+REACT_APP_AUTH_URL=https://iam.amsterdam.nl/auth/
+
# AZA
REACT_APP_AZA_FE=https://wonen.zaken.amsterdam.nl/
diff --git a/.env.test b/.env.test
deleted file mode 100644
index c0d776ad9..000000000
--- a/.env.test
+++ /dev/null
@@ -1,3 +0,0 @@
-REACT_APP_API_HOST=http://localhost:8080/
-REACT_APP_API_PATH=api/v1/
-REACT_APP_AUTH_URL=/authentication/callback?code=1234567890abcdefghijkl
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 000000000..c4c7eba73
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+npm run lint:fix
diff --git a/Dockerfile b/Dockerfile
index e049f0c18..151240d25 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,35 +8,35 @@ ARG COMMIT_HASH
ENV DIR /var/www
COPY . $DIR/
+RUN ls -la $DIR
# build dirs
-RUN mkdir -p $DIR/builds/acceptance
-RUN mkdir -p $DIR/builds/production
+RUN mkdir -p $DIR/builds/application
WORKDIR $DIR
-
-# install dependencies
+COPY package*.json $DIR/
RUN npm ci --production --unsafe-perm --ignore-scripts .
# global variables
-RUN echo "REACT_APP_GIT_COMMIT_HASH=$COMMIT_HASH" > .env.local
+# RUN echo "REACT_APP_GIT_COMMIT_HASH=$COMMIT_HASH" > .env.local
+
+# remove storybook files
+RUN find src -type f -name "*.stories.tsx" -delete
-# build production
RUN npm run build
-RUN mv $DIR/build/* $DIR/builds/production/
-# build acceptance
-RUN npm run build:acc
-RUN mv $DIR/build/* $DIR/builds/acceptance/
+RUN mv $DIR/build/* $DIR/builds/application/
-# Use the official Nginx image as the final stage
FROM nginx:stable-alpine
-# Copy the nginx configuration
ADD nginx.conf /etc/nginx/nginx.conf
-
-# Copy the build artifacts from the builder stage
COPY --from=builder /var/www/builds /var/www
+COPY --from=builder /var/www/env.* /var/www
+COPY --from=builder /var/www/package.json /var/www/package.json
+
+COPY entrypoint.sh /entrypoint.sh
+
+RUN chmod +x /entrypoint.sh
-# Start nginx
+ENTRYPOINT [ "/entrypoint.sh" ]
CMD nginx -g 'daemon off;'
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..52f0bb7d6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+.PHONY: manifests deploy
+
+dc = docker-compose
+
+ENVIRONMENT ?= local
+HELM_ARGS = manifests/chart \
+ -f manifests/values.yaml \
+ -f manifests/env/${ENVIRONMENT}.yaml \
+ --set image.tag=${VERSION}
+
+REGISTRY ?= 127.0.0.1:5001
+REPOSITORY ?= salmagundi/zaken-frontend
+VERSION ?= latest
+
+build:
+ $(dc) build
+
+test:
+ echo "No tests available"
+
+migrate:
+
+push:
+ $(dc) push
+
+
+manifests:
+ @helm template wonen-frontend $(HELM_ARGS) $(ARGS)
+
+deploy: manifests
+ helm upgrade --install wonen-frontend $(HELM_ARGS) $(ARGS)
+
+update-chart:
+ rm -rf manifests/chart
+ git clone --branch 1.5.2 --depth 1 git@github.com:Amsterdam/helm-application.git manifests/chart
+ rm -rf manifests/chart/.git
+
+clean:
+ $(dc) down -v --remove-orphans
+
+reset:
+ helm uninstall wonen-frontend
+
+refresh: reset build push deploy
+
+dev:
+ nohup kubycat kubycat-config.yaml > /dev/null 2>&1&
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..8f6b0dccc
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,10 @@
+version: "3"
+services:
+ zaken-frontend:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ container_name: zaken-frontend
+ image: ${REGISTRY:-127.0.0.1:5001}/${REPOSITORY:-salmagundi/zaken-frontend}:${VERSION:-latest}
+ ports:
+ - "8081:8000"
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644
index 000000000..e8ce34dd2
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -x
+
+# This script will read all the env variables prefixed with REACT_APP on start of the container and write them to the env.js file
+# The code uses this file as the env variables instead of the .env files
+# This makes it possible to use a single build artifact/image for multiple environment
+
+echo "window.env = {" >> /var/www/application/config/env.js
+
+for var in $(printenv); do
+ if [[ $var == REACT_APP* ]]; then
+ key=$(echo $var | cut -f1 -d=)
+ value=$(echo $var | cut -f2 -d=)
+ echo " \"$key\": \"$value\"," >> /var/www/application/config/env.js
+ fi
+done
+
+echo "}" >> /var/www/application/config/env.js
+
+exec "$@"
\ No newline at end of file
diff --git a/index.html b/index.html
index a6582963b..d8f74a46e 100644
--- a/index.html
+++ b/index.html
@@ -7,14 +7,13 @@
-
+